From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Tomonari Katsumata <katsumata.tomonari@po.ntts.co.jp>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7803: Replication Problem(no master is there)
Date: Tue, 15 Jan 2013 10:25:56 +0200
Message-ID: <50F51294.4090406@vmware.com> (raw)
In-Reply-To: <CA+U5nMJEVsP6dKuthyD1GpuW-LPeToPjpvtL3gZEC5Nv7_YROQ@mail.gmail.com>
References: <E1TtVvj-0004B3-2Z@wrigleys.postgresql.org>
<50EFCFF5.4040109@vmware.com>
<50F00301.1060301@po.ntts.co.jp>
<CA+U5nM+T7UbzziULTx22sSQQqvXqJ-AVzzdqDn-q=4k94pu_Ew@mail.gmail.com>
<50F4E52E.9000603@po.ntts.co.jp>
<CA+U5nMJEVsP6dKuthyD1GpuW-LPeToPjpvtL3gZEC5Nv7_YROQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 15.01.2013 10:14, Simon Riggs wrote:
> On 15 January 2013 05:12, Tomonari Katsumata
> <katsumata.tomonari@po.ntts.co.jp> wrote:
>
>>> We added a REPLICATION privelge onto user accounts to control access.
>>>
>>> Perhaps we should add a CASCADE privilege as well, so that we can
>>> control whether we can connect to a master and/or a standby.
>>>
>>> Syntax would be
>>>
>>> ALTER USER foo
>>> [MASTER | CASCADE] REPLICATION
>>>
>>> REPLICATION allows both master and cascaded replication (same as now)
>>> MASTER REPLICATION allows master only
>>> CASCADE REPLICATION allows cascaded replication only
>>> NOREPLICATION allows neither option
>>>
>
>> Someone is working for it already ?
>> If not yet, may I try to implement it ?
>
> Please do. It looks fairly short.
To me, permissions doesn't feel like the right vehicle for controlling
this. Not sure what to suggest instead, a new GUC perhaps.
BTW, is there any reason to not allow streaming replication when
hot_standby=off? A streaming replication connection doesn't execute any
queries, so it doesn't need the system to be consistent.
Another thing to consider is that "pg_basebackup -X stream" also uses
streaming replication, so if you forbid cascade replication, you also
forbid using "pg_basebackup -X stream" on the standby. At the protocol
level, pg_basebackup streams the WAL just like a standby server does, so
we cannot distinguish those two cases in the server. The client could
tell the server which one it is, but using permissions to allow/forbid
based on that would make no sense as the client could lie which one it is.
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnakangas@vmware.com, simon@2ndQuadrant.com, katsumata.tomonari@po.ntts.co.jp
Subject: Re: BUG #7803: Replication Problem(no master is there)
In-Reply-To: <50F51294.4090406@vmware.com>
References: <E1TtVvj-0004B3-2Z@wrigleys.postgresql.org> <50EFCFF5.4040109@vmware.com> <50F00301.1060301@po.ntts.co.jp> <CA+U5nM+T7UbzziULTx22sSQQqvXqJ-AVzzdqDn-q=4k94pu_Ew@mail.gmail.com> <50F4E52E.9000603@po.ntts.co.jp> <CA+U5nMJEVsP6dKuthyD1GpuW-LPeToPjpvtL3gZEC5Nv7_YROQ@mail.gmail.com> <50F51294.4090406@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox