]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix rare test failure in nbtree_half_dead_pages
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 16 Jan 2026 12:09:22 +0000 (14:09 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 16 Jan 2026 12:38:20 +0000 (14:38 +0200)
commit1c64d2fcbe7b27758772c7bc335f29263771ba1d
treef280df1343a08b68f10e2af0e262eed90f4263a3
parent84705b37273da016633fc5c0a06e848bd6e1e71b
Fix rare test failure in nbtree_half_dead_pages

If auto-analyze kicks in at just the right moment, it can hold a
snapshot and prevent the VACUUM command in the test from removing the
deleted tuples. The test needs the tuples to be removed, otherwise no
half-dead page is generated. To fix, introduce a helper procedure to
wait for the removable cutoff to advance, like the one used in the
syscache-update-pruned test for similar purposes.

Thanks to Alexander Lakhin for reproducing and analyzing the test
failure, and Tom Lane for the report.

Discussion: https://www.postgresql.org/message-id/307198.1767408023@sss.pgh.pa.us
src/test/modules/nbtree/expected/nbtree_half_dead_pages.out
src/test/modules/nbtree/sql/nbtree_half_dead_pages.sql