Re: dividing privileges for replication role. - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: dividing privileges for replication role.
Date
Msg-id CAB7nPqRsSpQtQMhu-m5e7e3vA8ChaEUQUET4WMYtu_=9oNBd2g@mail.gmail.com
Whole thread Raw
In response to dividing privileges for replication role.  (Tomonari Katsumata <t.katsumata1122@gmail.com>)
List pgsql-hackers


On Sat, Jan 19, 2013 at 12:47 PM, Tomonari Katsumata <t.katsumata1122@gmail.com> wrote:
a) adding new privileges for replication:"MASTER REPLICATION" and "CASCADE REPLICATION"

   "MASTER REPLICATION":  Replication-connection to master server is only allowed
   "CASCADE REPLICATION": Replication-connection to cascade server is only allowed
   ("REPLICATION" already implemented means replication-connection to both servers is allowed)

This does not really solve the case you reported because, as reported in your bug, you could still have each slave connecting to each other using the privilege CASCADE REPLICATION. It makes even the privilege level more complicated.

What would be necessary to solve your problem would be to have each standby being aware that it is connected to a unique master. This is not really an issue with privileges but more of something like having a standby scanning its upper cluster node tree and check if there is a master connected. While checking the cluster node tree, you will also need to be aware if a node has already been found when you scanned it to be sure that the same node has not been scanned, what would mean that you are in a cycle.
--
Michael Paquier
http://michael.otacoo.com

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Contrib PROGRAM problem
Next
From: Robert Haas
Date:
Subject: Re: CF3+4 (was Re: Parallel query execution)