Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 944E1B5D80A for ; Thu, 27 Oct 2011 19:15:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 94996-08 for ; Thu, 27 Oct 2011 22:15:23 +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 D697EB5DC23 for ; Thu, 27 Oct 2011 19:15:22 -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 p9RMFLCq007163; Thu, 27 Oct 2011 18:15:21 -0400 (EDT) To: Noah Misch cc: Robert Haas , Magnus Hagander , Keith Fiske , pgsql-bugs@postgresql.org Subject: Re: Re: BUG #6264: Superuser does not have inherent Replication permission In-reply-to: <20111027210132.GA8856@tornado.leadboat.com> References: <201110212154.p9LLsun5077390@wwwmaster.postgresql.org> <9214.1319298574@sss.pgh.pa.us> <20111027210132.GA8856@tornado.leadboat.com> Comments: In-reply-to Noah Misch message dated "Thu, 27 Oct 2011 17:01:32 -0400" Date: Thu, 27 Oct 2011 18:15:21 -0400 Message-ID: <7162.1319753721@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/269 X-Sequence-Number: 31539 Noah Misch writes: > Let's look at the behavior of DDL-exposed access constraints for precedent. We > currently have three paradigms for applying access control to superusers: > 1. Settings that affect superusers and regular users identically. These include > ALTER ROLE ... LOGIN | VALID UNTIL. > 2. Rights that superusers possess implicitly and irrevocably; the actual setting > recorded in pg_authid or elsewhere has no effect. These include GRANT ... ON > TABLE and ALTER ROLE ... CREATEDB | CREATEROLE. > 3. ALTER ROLE ... REPLICATION is very similar to #1, except that CREATE ROLE > ... SUPERUSER implies CREATE ROLE ... SUPERUSER REPLICATION. > I think we should merge #3 into #2; nothing about the REPLICATION setting > justifies a distinct paradigm. Yeah, there's much to be said for that. I thought the notion of a privilege that superusers might not have was pretty bogus to start with. rolcatupdate isn't a very good precedent to rely on because it's never been documented or used to any noticeable extent, so there's no reason to think that it provides a tested-and-accepted behavior. regards, tom lane