pgsql: pg_walsummary: Improve stability of test checking statistics

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_walsummary: Improve stability of test checking statistics
Date: 2025-07-08 04:49:17
Message-ID: E1uZ0Ga-005D5N-34@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_walsummary: Improve stability of test checking statistics

Per buildfarm member culicidae, the query checking for stats reported by
the WAL summarizer related to WAL reads is proving to be unstable.

Instead of a one-time query, this commit replaces the logic with a
polling query checking for the WAL read stats, making the test more
reliable on machines that could be slow with the stats reports.

This test has been introduced in f4694e0f35b2, so backpatch down to v18.

Reported-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Reviewed-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Discussion: https://postgr.es/m/f35ba3db-fca7-4693-bc35-6db64488e4b1@gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a27893df45ec5d8c657899202e9cf0b9a816fe2f

Modified Files
--------------
src/bin/pg_walsummary/t/002_blocks.pl | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-07-08 15:23:24 pgsql: Change pg_test_timing to measure in nanoseconds not microseconds
Previous Message Andres Freund 2025-07-08 03:20:18 pgsql: aio: Combine io_uring memory mappings, if supported