From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Date: Fri, 17 Dec 2021 12:52:39 -0500
Message-ID: <1363170.1639763559@sss.pgh.pa.us> (raw)
In-Reply-To: <E1mOaBy-0006mH-1P@gemulon.postgresql.org>
References: <E1mOaBy-0006mH-1P@gemulon.postgresql.org>
Noah Misch <noah@leadboat.com> 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
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
In-Reply-To: <1363170.1639763559@sss.pgh.pa.us>
References: <E1mOaBy-0006mH-1P@gemulon.postgresql.org> <1363170.1639763559@sss.pgh.pa.us>
* 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