Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4vgv-0007bu-I5 for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Dec 2014 18:02:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y4vgu-0002ES-CP for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Dec 2014 18:02:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y4vgs-0002EL-Oz for pgsql-hackers@postgresql.org; Sat, 27 Dec 2014 18:02:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y4vgo-0005rH-CP for pgsql-hackers@postgresql.org; Sat, 27 Dec 2014 18:02:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sBRI24Jq028383; Sat, 27 Dec 2014 13:02:04 -0500 From: Tom Lane To: Stephen Frost cc: Noah Misch , Adam Brightwell , PostgreSQL Hackers Subject: Re: CATUPDATE confusion? In-reply-to: <20141227151034.GU3062@tamriel.snowman.net> References: <20141227080926.GA2035611@tornado.leadboat.com> <20141227151034.GU3062@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Sat, 27 Dec 2014 10:10:34 -0500" Date: Sat, 27 Dec 2014 13:02:04 -0500 Message-ID: <28382.1419703324@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Stephen Frost writes: > * Noah Misch (noah@leadboat.com) wrote: >> On Mon, Nov 24, 2014 at 04:28:46PM -0500, Adam Brightwell wrote: >>> Perhaps this is not an issue but it seemed odd to me, especially after >>> giving Peter's comment more thought. So, I suppose the question is whether >>> or not a superuser check should be added to 'has_rolcatupdate' or not? I >> I would not. PostgreSQL has had this feature since day one (original name >> "usecatupd"). It has two use cases, (1) giving effect to non-superuser >> catalog grants and (2) preventing a narrow class of superuser mistakes. We >> wouldn't add such a thing today, but one can safely ignore its existence. >> Making has_rolcatupdate() approve superusers unconditionally would exclude use >> case (2). Neither use case is valuable, but if I had to pick, (2) is more >> valuable than (1). > What's confusing about this is that use-case (2) appears to have been > the intent of the option, Yes. Noah's claim that anybody intended (1) seems to be mere historical revisionism, especially since as you note CATUPDATE could be trivially parlayed into superuser if someone were to grant it to a non-superuser. > but because it's tied directly to superuser > and isn't an independently controllable option, the only way change it > is to do an 'update pg_authid ...'. Even when set that way, it isn't > visible that it's been set through \du, you have to query the catalog > directly. This is not hard to understand either: the option dates from long before there was any concerted effort to invent bespoke SQL commands for every interesting catalog manipulation. If CATUPDATE had any significant use, we'd have extended ALTER USER (and \du, and pg_dump ...) at some point to make it more easily controllable. But since it's of such marginal usefulness, nobody ever bothered; and I doubt we should bother now. In short, I agree with Noah's conclusion (do nothing) though not his reasoning. Plan C (remove CATUPDATE altogether) also has some merit. But adding a superuser override there would be entirely pointless. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers