Hello Tom and Heikki,
03.01.2026 04:40, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> On 02/12/2025 19:59, Peter Geoghegan wrote:
>>> These tests will increase nbtree code coverage quite a bit, which is a
>>> nice bonus.
>> Committed, thanks for the review!
> In the past couple of days, scorpion and skink have failed
> the nbtree_half_dead_pages test with identical symptoms [1][2]:
> ...
> [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=scorpion&dt=2026-01-02%2004%3A54%3A38
> [2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-12-31%2003%3A34%3A51
I reproduced such failures locally (when running multiple test
instances under Valgrind concurrently) and discovered that the test might
fail due to autovacuum activity. (Apparently because
heap_prune_satisfies_vacuum() returns HEAPTUPLE_RECENTLY_DEAD, not
HEAPTUPLE_DEAD for tuples in question, so prune_freeze_plan()/
heap_page_prune_and_freeze() finds 0 lpdead_items.)
pgsql.build/testrun/nbtree/regress/log/postmaster.log in [2] contains:
2025-12-31 06:00:41.778 CET autovacuum worker[2250984] LOG: automatic analyze of table
"template1.information_schema.sql_features"
(The postmaster log is missing in [1] for some reason...)
I've also managed to reproduce this just with the attached patch and:
echo "autovacuum_naptime = 1" > /tmp/temp.config
TEMP_CONFIG=/tmp/temp.config make -s check -C src/test/modules/nbtree
ok 86 - nbtree_half_dead_pages 319 ms
not ok 87 - nbtree_half_dead_pages 324 ms
ok 88 - nbtree_half_dead_pages 326 ms
...
# 1 of 101 tests failed.
Best regards,
Alexander