Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myHPS-0001aX-7r for pgsql-committers@arkaria.postgresql.org; Fri, 17 Dec 2021 17:52:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1myHPQ-0001aK-UE for pgsql-committers@arkaria.postgresql.org; Fri, 17 Dec 2021 17:52:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myHPQ-0001YB-MX for pgsql-committers@lists.postgresql.org; Fri, 17 Dec 2021 17:52:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myHPO-0000f5-Ja for pgsql-committers@lists.postgresql.org; Fri, 17 Dec 2021 17:52:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BHHqdGT1363171; Fri, 17 Dec 2021 12:52:39 -0500 From: Tom Lane To: Noah Misch cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas In-reply-to: References: Comments: In-reply-to Noah Misch message dated "Fri, 10 Sep 2021 06:39:18 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1363169.1639763559.1@sss.pgh.pa.us> Date: Fri, 17 Dec 2021 12:52:39 -0500 Message-ID: <1363170.1639763559@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner. I've just stumbled across a testing problem created by this commit: if you try to skip the tablespace test, the rest of the run falls over, because this bit doesn't get executed: -- Rest of this suite can use the public schema freely. GRANT ALL ON SCHEMA public TO public; Skipping the tablespace test is something I've been accustomed to do when testing replication with the standby on the same machine as the primary, because otherwise you've got to fool with keeping the standby from overwriting the primary's tablespaces. This hack made that a lot more painful. I'm inclined to think the cleanest fix is to move this step into a new script, say "test_setup.sql", that is scheduled by itself just after tablespace.sql. It's sort of annoying to fire up a psql+backend for just one command, but perhaps there's other stuff that could be put there too. Another possibility is to add that GRANT to the list of stuff that pg_regress.c does by default. If there's actually reason for tablespace.sql to run without that, it could revoke and re-grant the public permissions. This way would have the advantage of being less likely to break other test suites. regards, tom lane