Re: DROP DATABASE is interruptible
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Daniel Gustafsson <daniel@yesql.se>, Thomas Munro <thomas.munro@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Evgeny Morozov <postgresql3@realityexists.net>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-09-25T18:52:23Z
Lists: pgsql-hackers
Hi,
On 2023-09-25 01:48:31 +0100, Peter Eisentraut wrote:
> I noticed that this patch set introduced this pg_dump test:
>
> On 12.07.23 03:59, Andres Freund wrote:
> > + 'CREATE DATABASE invalid...' => {
> > + create_order => 1,
> > + create_sql => q(CREATE DATABASE invalid; UPDATE pg_database SET datconnlimit = -2 WHERE datname = 'invalid'),
> > + regexp => qr/^CREATE DATABASE invalid/m,
> > + not_like => {
> > + pg_dumpall_dbprivs => 1,
> > + },
> > + },
>
> But the key "not_like" isn't used for anything by that test suite. Maybe
> "unlike" was meant?
It's not clear to me either. Invalid databases shouldn't *ever* be dumped, so
explicitly listing pg_dumpall_dbprivs is odd.
TBH, I find this testsuite the most opaque in postgres...
> But even then it would be useless because the "like" key is empty, so there
> is nothing that "unlike" can subtract from. Was there something expected
> from the mention of "pg_dumpall_dbprivs"?
Not that I can figure out...
> Perhaps it would be better to write out
>
> like => {},
>
> explicitly, with a comment, like some other tests are doing.
Yea, that looks like the right direction.
I'll go and backpatch the adjustment.
Greetings,
Andres Freund
Commits
-
pg_dump: tests: Correct test condition for invalid databases
- 881defde944c 16.1 landed
- 6a3b19bbefd7 11.22 landed
- fd7a114dbb4e 12.17 landed
- d1c76fdec375 13.13 landed
- 4dfb610822d5 14.10 landed
- 9dc3c5472ed9 15.5 landed
- 849d367ff9a2 17.0 landed
-
Handle DROP DATABASE getting interrupted
- f66403749df7 15.4 landed
- 1c38e7ae17b6 11.21 landed
- 034a9fcd2bb8 12.16 landed
- 81ce000067e3 13.12 landed
- d11efe830385 14.9 landed
- a4b4cc1d60f7 16.0 landed
- c66a7d75e652 17.0 landed