Revise pg_walsummary's 002_blocks test to avoid spurious failures.
authorRobert Haas <rhaas@postgresql.org>
Wed, 31 Jan 2024 15:12:53 +0000 (10:12 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 31 Jan 2024 15:12:53 +0000 (10:12 -0500)
commitea18eb7d625573dc369df619f7ff3b9e60e47531
treed1eb1e98b38b6c21257dc92c40472e97de685f83
parentd0283387d358e5e0a64a439b7fe906399b59fdd9
Revise pg_walsummary's 002_blocks test to avoid spurious failures.

Analysis of buildfarm results showed that the code that was intended
to wait for the inserts performed by this test to complete did not
actually do so. Try to make that logic more robust.

Improve error checking elsewhere in the script, too, so that we
don't miss things like poll_query_until failing.

Along the way, fix a bit of pgindent damage introduced by commit
5ddf9973477729cf161b4ad0a1efd52f4fea9c88, which aimed to help us
debug the failures that this commit is trying to fix. It's making
the buildfarm sad.

Discussion: http://postgr.es/m/CA+TgmobWFb8NqyfC31YnKAbZiXf9tLuwmyuvx=iYMXMniPQ4nw@mail.gmail.com
src/backend/backup/walsummary.c
src/bin/pg_walsummary/t/002_blocks.pl