Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit330db57

Browse files
committed
pg_walsummary: Improve stability of test checking statistics
Per buildfarm member culicidae, the query checking for stats reported bythe WAL summarizer related to WAL reads is proving to be unstable.Instead of a one-time query, this commit replaces the logic with apolling query checking for the WAL read stats, making the test morereliable on machines that could be slow with the stats reports.This test has been introduced inf4694e0, so backpatch down to v18.Reported-by: Alexander Lakhin <exclusion@gmail.com>Reviewed-by: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/f35ba3db-fca7-4693-bc35-6db64488e4b1@gmail.comBackpatch-through: 18
1 parent9a5334c commit330db57

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/bin/pg_walsummary/t/002_blocks.pl‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@
4747
ok($result,"WAL summarization caught up after insert");
4848

4949
# The WAL summarizer should have generated some IO statistics.
50-
my$stats_reads =$node1->safe_psql(
50+
$node1->poll_query_until(
5151
'postgres',
52-
qq{SELECT sum(reads) > 0 FROM pg_stat_io
53-
WHERE backend_type = 'walsummarizer' AND object = 'wal'});
54-
is($stats_reads,'t',"WAL summarizer generates statistics for WAL reads");
52+
q{SELECT sum(reads) > 0 FROM pg_stat_io
53+
WHERE backend_type = 'walsummarizer' AND object = 'wal'})
54+
ordie
55+
"Timed out while waiting for WAL summarizer to generate statistics for WAL reads";
5556

5657
# Find the highest LSN that is summarized on disk.
5758
my$summarized_lsn =$node1->safe_psql('postgres',<<EOM);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp