From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix rare test failure in nbtree_half_dead_pages
Date: Fri, 16 Jan 2026 12:40:26 +0000
Message-ID: <E1vgj7q-000nhy-0E@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1c64d2fcbe7b27758772c7bc335f29263771ba1d
Modified Files
--------------
.../nbtree/expected/nbtree_half_dead_pages.out | 23 +++++++++++++++++++++
.../modules/nbtree/sql/nbtree_half_dead_pages.sql | 24 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix rare test failure in nbtree_half_dead_pages
In-Reply-To: <E1vgj7q-000nhy-0E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox