Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1BBB4B5DC1E for ; Sat, 22 Oct 2011 12:49:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 52728-06 for ; Sat, 22 Oct 2011 15:49:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AADF5B5DC0C for ; Sat, 22 Oct 2011 12:49:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9MFnYMY009215; Sat, 22 Oct 2011 11:49:34 -0400 (EDT) To: "Keith Fiske" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6264: Superuser does not have inherent Replication permission In-reply-to: <201110212154.p9LLsun5077390@wwwmaster.postgresql.org> References: <201110212154.p9LLsun5077390@wwwmaster.postgresql.org> Comments: In-reply-to "Keith Fiske" message dated "Fri, 21 Oct 2011 21:54:56 +0000" Date: Sat, 22 Oct 2011 11:49:34 -0400 Message-ID: <9214.1319298574@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.684 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 201110/213 X-Sequence-Number: 31483 "Keith Fiske" writes: > The documentation says replication is inherent to a superuser. What it actually says is that superusers get the replication privilege by default --- but you can create a superuser without that. If you see a place that says something different, please point it out specifically so we can improve it. > After testing > several times, I can assure you it is not. Please show your test case. It looks to me like it works as expected: regression=# create user foo superuser; CREATE ROLE regression=# create user foo2 superuser noreplication; CREATE ROLE regression=# select rolname,rolsuper,rolreplication from pg_authid ; rolname | rolsuper | rolreplication ----------+----------+---------------- postgres | t | t foo | t | t foo2 | t | f (3 rows) > If you create a user as a NONsuperuser, > then later ALTER them to be one, they will NOT have the replication > permission and cannot be used as a replication user until you explicitly > grant that permission. That doesn't sound to me like a bug. These flags are independent, we just provide a certain default at role creation time. regards, tom lane