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

Commit19a829a

Browse files
committed
Continue my quest to make 002_blocks.pl pass reliably.
The latest buildfarm failures show that after the insert, we don'tactually wait long enough for WAL summarization to catch up, apparentlybecause the on disk state gets updated before the in-memory state, andso by checking the on disk state to see whether we're caught up and thenthe in-memory state to see where exactly how far we've progressed, wecan, if unlucky, derive an older value of summarized_lsn, messing upthe rest of the test.Attempt to fix this by using pg_available_wal_summaries() everywhere inthe test and pg_get_wal_summarizer_state() nowhere.Per buildfarm.
1 parent21912e3 commit19a829a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

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

49-
#Get a list of what summaries we now have.
50-
my$progress =$node1->safe_psql('postgres',<<EOM);
51-
SELECTsummarized_tli,summarized_lsn FROMpg_get_wal_summarizer_state()
49+
#Find the highest LSN that is summarized on disk.
50+
my$summarized_lsn =$node1->safe_psql('postgres',<<EOM);
51+
SELECTMAX(end_lsn) ASsummarized_lsn FROMpg_available_wal_summaries()
5252
EOM
53-
my ($summarized_tli,$summarized_lsn) =split(/\|/,$progress);
54-
note("after insert, summarized TLI$summarized_tli through$summarized_lsn");
53+
note("after insert, summarized through$summarized_lsn");
5554
note_wal_summary_dir("after insert",$node1);
5655

5756
# Update a row in the first block of the table and trigger a checkpoint.
@@ -65,15 +64,15 @@
6564
$result =$node1->poll_query_until('postgres',<<EOM);
6665
SELECT EXISTS (
6766
SELECT * from pg_available_wal_summaries()
68-
WHEREtli =$summarized_tli ANDend_lsn > '$summarized_lsn'
67+
WHERE end_lsn > '$summarized_lsn'
6968
)
7069
EOM
7170
ok($result,"got new WAL summary after update");
7271

7372
# Figure out the exact details for the new summary file.
7473
my$details =$node1->safe_psql('postgres',<<EOM);
7574
SELECT tli, start_lsn, end_lsn from pg_available_wal_summaries()
76-
WHEREtli =$summarized_tli ANDend_lsn > '$summarized_lsn'
75+
WHERE end_lsn > '$summarized_lsn'
7776
EOM
7877
my@lines =split(/\n/,$details);
7978
is(0+@lines, 1,"got exactly one new WAL summary");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp