Re: pgsql: Clean up role created in new subscription test.

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Clean up role created in new subscription test.
Date: 2023-03-30 20:53:03
Message-ID: 2A3A15B2-FD71-4767-9A01-4C2C9264F960@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

> On 30 Mar 2023, at 22:29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>>> On 30 Mar 2023, at 20:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

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

I can see the value in doing something like this to keep us honest.

--
Daniel Gustafsson

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-03-30 21:24:17 pgsql: pg_stat_wal: Accumulate time as instr_time instead of microsecon
Previous Message Tom Lane 2023-03-30 20:29:36 Re: pgsql: Clean up role created in new subscription test.

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-03-30 20:54:46 Re: Thoughts on using Text::Template for our autogenerated code?
Previous Message Tom Lane 2023-03-30 20:29:36 Re: pgsql: Clean up role created in new subscription test.