pgsql: Stabilize the FORCE drop test for online data checksums

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Stabilize the FORCE drop test for online data checksums
Date: 2026-08-18 20:41:16
Message-ID: E1wwQcV-000000016t0-0WOD@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Stabilize the FORCE drop test for online data checksums

Commit 51f55b13a4d added a test where DROP DATABASE ... WITH (FORCE)
terminates a session holding a temporary table in the target database.
While exiting, the terminated session drops its temporary table and
commits, and the commit waits for a WAL flush behind the backlog
generated by the checksum workers. On machines with slow storage this
can exceed the five seconds DROP DATABASE waits for terminated backends
to exit, making the test fail with "database "dropmeforce" is being
accessed by other users", as observed on buildfarm member turaco.

To fix, use asynchronous commit in the terminated session, so that its
exit does not wait for a WAL flush, and checkpoint before the drop so
that the exit-time WAL records do not queue up behind the backlog.

Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reported-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Discussion: https://postgr.es/m/361531e2-52b5-499c-a126-815f277bbef2@gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1d28812160d4e7ec06ebb2223d2c67b0dec74720

Modified Files
--------------
src/test/modules/test_checksums/t/001_basic.pl | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2026-08-18 20:57:40 pgsql: test_decoding: Don't print virtual generated columns.
Previous Message Daniel Gustafsson 2026-08-18 20:40:39 pgsql: Minor test suite cleanup