repro_and_fix.patch
text/x-diff
Filename: repro_and_fix.patch
Type: text/x-diff
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/pg_walsummary/t/002_blocks.pl | 7 | 1 |
diff --git a/src/bin/pg_walsummary/t/002_blocks.pl b/src/bin/pg_walsummary/t/002_blocks.pl
index 40908da8cb..5609b1bd14 100644
--- a/src/bin/pg_walsummary/t/002_blocks.pl
+++ b/src/bin/pg_walsummary/t/002_blocks.pl
@@ -64,10 +64,16 @@ SELECT EXISTS (
)
EOM
+$node1->safe_psql('postgres', <<EOM);
+UPDATE mytable SET b = 'abefghijklmnopqrstuvwxyz' WHERE a = 2;
+CHECKPOINT;
+EOM
+$node1->safe_psql('postgres', 'SELECT pg_sleep(1);');
+
# Figure out the exact details for the new summary file.
my $details = $node1->safe_psql('postgres', <<EOM);
SELECT tli, start_lsn, end_lsn from pg_available_wal_summaries()
- WHERE tli = $summarized_tli AND end_lsn > '$summarized_lsn'
+ WHERE tli = $summarized_tli AND end_lsn > '$summarized_lsn' ORDER BY end_lsn LIMIT 1
EOM
my ($tli, $start_lsn, $end_lsn) = split(/\|/, $details);
note("examining summary for TLI $tli from $start_lsn to $end_lsn");