From: Justin Pryzby <pryzby@telsasoft.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Adjust interaction of CREATEROLE with role properties.
Date: Fri, 27 Jan 2023 09:28:54 -0600
Message-ID: <20230127152854.GY22427@telsasoft.com> (raw)
In-Reply-To: <6c20449e-ac9c-7876-0d90-70a1ddea1076@dunslane.net>
References: <E1pKLii-005G5B-Br@gemulon.postgresql.org>
<20230126114659.x3yuypot7p6zj73c@alvherre.pgsql>
<CA+TgmoYyJrOkBtFpSpVaZML-EPnG9VwSpvicj8=5Sbu647KRcQ@mail.gmail.com>
<25633601-9749-a03c-e1cc-8ff2cf7c599a@dunslane.net>
<20230126183106.GS22427@telsasoft.com>
<Y9MZxVrCoutVbMCM@paquier.xyz>
<3248936.1674785303@sss.pgh.pa.us>
<Y9M/mqKqGXYt3jkC@paquier.xyz>
<3255990.1674789499@sss.pgh.pa.us>
<6c20449e-ac9c-7876-0d90-70a1ddea1076@dunslane.net>
On Fri, Jan 27, 2023 at 08:27:40AM -0500, Andrew Dunstan wrote:
> On 2023-01-26 Th 22:18, Tom Lane wrote:
> > Michael Paquier <michael@paquier.xyz> writes:
> >> On Thu, Jan 26, 2023 at 09:08:23PM -0500, Tom Lane wrote:
> >>> Is it worth checking for leftover regress_xxx tablespaces as well as
> >>> roles?
> >> Guess so. If this is to be applied to everything that fails under the
> >> naming restrictions, there could be a point in doing the same for
> >> databases, subscriptions and replication origins. Now the argument
> >> has less weight for these object types, surely, compared to roles and
> >> tbspaces.
> > By the time we've spun up a new backend, we might as well do more
> > than one query, so it seems like we might as well check everything
> > that's globally visible.
> >
> > However ... this'd only cover mistakes of this kind in the core
> > regression tests. Is there a way to cover contrib's installcheck
> > (without adding an additional psql run to each module's tests)?
> >
> > Maybe we need to enforce this at some other level than the tests
> > themselves, perhaps in pg_regress?
>
> Yeah, that seems like a better way to go. Then it would even apply to
> external project tests.
Maybe this could be done by creating a pg_dump ?
The dump could be grepped (like pg_restore -l |perl -pe '/ROLE|.../')
for offending objects.
And the dump could be re-used for other things, like not re-running
regression tests in pg_upgrade and 027_stream_regress.
I don't know whether the pg_dump would be run directly by pg_regress or
something else.
--
Justin
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: pryzby@telsasoft.com, andrew@dunslane.net, tgl@sss.pgh.pa.us, michael@paquier.xyz, robertmhaas@gmail.com, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Adjust interaction of CREATEROLE with role properties.
In-Reply-To: <20230127152854.GY22427@telsasoft.com>
References: <E1pKLii-005G5B-Br@gemulon.postgresql.org> <20230126114659.x3yuypot7p6zj73c@alvherre.pgsql> <CA+TgmoYyJrOkBtFpSpVaZML-EPnG9VwSpvicj8=5Sbu647KRcQ@mail.gmail.com> <25633601-9749-a03c-e1cc-8ff2cf7c599a@dunslane.net> <20230126183106.GS22427@telsasoft.com> <Y9MZxVrCoutVbMCM@paquier.xyz> <3248936.1674785303@sss.pgh.pa.us> <Y9M/mqKqGXYt3jkC@paquier.xyz> <3255990.1674789499@sss.pgh.pa.us> <6c20449e-ac9c-7876-0d90-70a1ddea1076@dunslane.net> <20230127152854.GY22427@telsasoft.com>
* 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