Re: pgsql: Clean up role created in new subscription test. - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pgsql: Clean up role created in new subscription test.
Date
Msg-id 99112997-6732-42C7-989B-06406C911FE2@yesql.se
Whole thread Raw
In response to Re: pgsql: Clean up role created in new subscription test.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Clean up role created in new subscription test.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 30 Mar 2023, at 20:44, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Maybe it'd be close enough to expect there to be no roles named
> "regress_xxx".  In combination with
> -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS, that would prevent us
> from accidentally leaving stuff behind, and we could hope that it doesn't
> cause false failures in real installations.

Would that check be always on or only when pg_regress is compiled with
-DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS?

> Another idea could be for pg_regress to enforce that "select count(*)
> from pg_roles" gives the same answer before and after the test run.

That wouldn't prevent the contents of pg_roles to have changed though, so there
is a (slim) false positive risk with that no?

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: ResourceOwner refactoring
Next
From: Melanie Plageman
Date:
Subject: Re: Parallel Full Hash Join