|
46 | 46 | EOM
|
47 | 47 | ok($result, "WAL summarization caught up after insert");
|
48 | 48 |
|
49 |
| -# Get a list of what summaries we now have. |
50 |
| -my $progress = $node1->safe_psql('postgres', <<EOM); |
51 |
| -SELECT summarized_tli, summarized_lsn FROM pg_get_wal_summarizer_state() |
| 49 | +# Find the highest LSN that is summarized on disk. |
| 50 | +my $summarized_lsn = $node1->safe_psql('postgres', <<EOM); |
| 51 | +SELECT MAX(end_lsn) AS summarized_lsn FROM pg_available_wal_summaries() |
52 | 52 | 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"); |
55 | 54 | note_wal_summary_dir("after insert", $node1);
|
56 | 55 |
|
57 | 56 | # Update a row in the first block of the table and trigger a checkpoint.
|
|
65 | 64 | $result = $node1->poll_query_until('postgres', <<EOM);
|
66 | 65 | SELECT EXISTS (
|
67 | 66 | SELECT * from pg_available_wal_summaries()
|
68 |
| - WHERE tli = $summarized_tli AND end_lsn > '$summarized_lsn' |
| 67 | + WHERE end_lsn > '$summarized_lsn' |
69 | 68 | )
|
70 | 69 | EOM
|
71 | 70 | ok($result, "got new WAL summary after update");
|
72 | 71 |
|
73 | 72 | # Figure out the exact details for the new summary file.
|
74 | 73 | my $details = $node1->safe_psql('postgres', <<EOM);
|
75 | 74 | SELECT tli, start_lsn, end_lsn from pg_available_wal_summaries()
|
76 |
| - WHERE tli = $summarized_tli AND end_lsn > '$summarized_lsn' |
| 75 | + WHERE end_lsn > '$summarized_lsn' |
77 | 76 | EOM
|
78 | 77 | my @lines = split(/\n/, $details);
|
79 | 78 | is(0+@lines, 1, "got exactly one new WAL summary");
|
|
0 commit comments