Minimize user permissions requirements for replication slots

Enable operations which create or drop replication slots to be carried
out with the minimum necessary user permissions, i.e. a user with the
REPLICATION attribute.

This can be the repmgr user, or a dedicated replication user.
In the latter case, if the dedicated replication user is only
permitted to make replication connections, the streaming
replication protocol is used to create/drop slots.

Implements part of GitHub #536.
This commit is contained in:
Ian Barwick
2019-10-23 10:56:14 +09:00
parent 1a9bcddccd
commit 220ec7fc96
6 changed files with 451 additions and 123 deletions

View File

@@ -19,14 +19,6 @@
#ifndef _REPMGR_ACTION_STANDBY_H_
#define _REPMGR_ACTION_STANDBY_H_
typedef enum
{
REPMGR_USER = 0,
REPLICATION_USER,
REPLICATION_PROTOCOL_USER,
SUPERUSER
} t_user_type;
extern void do_standby_clone(void);
extern void do_standby_register(void);
extern void do_standby_unregister(void);