pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Clean up role created in new subscription test.
Date: Thu, 30 Mar 2023 16:29:36 -0400
Message-ID: <284965.1680208176@sss.pgh.pa.us> (raw)
In-Reply-To: <99112997-6732-42C7-989B-06406C911FE2@yesql.se>
References: <E1phvk7-000VAH-7k@gemulon.postgresql.org>
	<CA+TgmoZ+K2OU0Ojs8_4SgqPWJJq7e0XiLd-uJGZ11R_WKF1URQ@mail.gmail.com>
	<267900.1680201870@sss.pgh.pa.us>
	<99112997-6732-42C7-989B-06406C911FE2@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
>> 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?

I envisioned it as being on all the time.

>> 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?

Well, we could do "select rolname from pg_roles order by 1" and
actually compare the results of the two selects.  That might be
advisable anyway, in order to produce a complaint with useful
detail when there is something wrong.

			regards, tom lane





view thread (28+ messages)  latest in thread

Message-ID: <284965.1680208176@sss.pgh.pa.us>
Permalink:  ../284965.1680208176@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/284965.1680208176@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Clean up role created in new subscription test.
  In-Reply-To: <284965.1680208176@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