Re: Instability of pg_walsummary/002_blocks.pl due to timing
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-07-07T05:00:01Z
Lists: pgsql-hackers
Hello Michail,
07.07.2025 03:18, Michael Paquier wrote:
> I'm failing to reproduce it, unfortunately. It looks like just a
> timing issue with the reports, so the best option I can think of here
> would be to switch the test to do a wait until the stats have been
> generated, leading to the attached. Do you still see the problem with
> that in place?
I'm sorry for not being accurate enough -- I forgot to mention that I
replicated the config from culicidae, and now I see that "fsync=on"
is needed to reproduce the failure for me (though maybe).
With:
./configure -q --enable-cassert --enable-debug --enable-tap-tests && make -s -j8
echo "fsync=on" >/tmp/temp.config
for i in {1..100}; do echo "ITERATION $i"; TEMP_CONFIG=/tmp/temp.config PROVE_TESTS="t/002*" make -s check -C
src/bin/pg_walsummary/ || break; done
I got failures on iterations 3, 5, 1. With your patch applied, I got 100
iterations passed.
Thank you for the fix!
Best regards,
Alexander
Commits
-
pg_walsummary: Improve stability of test checking statistics
- 330db576f8c3 18.0 landed
- a27893df45ec 19 (unreleased) landed