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 <[email protected]> Reported-by: Alexander Lakhin <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f7a0cca2e35e36cb08817a40650a086d982ed942 Modified Files -------------- src/test/modules/test_checksums/t/001_basic.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
