| From: | João Rito <joaovictor(dot)rito(at)gmail(dot)com> |
|---|---|
| To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Manu <manuelreyesbravo(at)gmail(dot)com> |
| Subject: | Re: WAL summarizer after promotion at a recovery target (v4, CF entry 7592) |
| Date: | 2026-11-12 10:12:32 |
| Message-ID: | CADMs5OOiP7Cfnah6XWXZYEMbsNAJF2Cy+TOwjGPCa=pbxU4ATw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
Thanks for the v4 series. I looked at it and ran it.
Applied: v4-0001..0003 apply cleanly with git am on master 9a84976.
The build (without ICU) succeeded.
Tested:
- "make check": passes.
- "make -C src/bin/pg_combinebackup check" (including the new
015_summary_past_switch.pl and 016_truncation_after_target.pl) and
"make -C src/bin/pg_walsummary check" (including
004_promote_past_target.pl): all pass.
- The new tests against unpatched master: on master 9a84976 with only
the test files from the series copied in (no changes to the C code),
all three fail:
- t/016_truncation_after_target.pl: the standby hits "TRAP: failed
Assert("end_of_summary_lsn >= current_lsn"), File: "walsummarizer.c",
Line: 455" and the test dies waiting for promotion.
- t/015_summary_past_switch.pl: "Failed test 'standby1: the
summarizer does not read past replay'" (got 'f', expected 't').
- t/004_promote_past_target.pl: "Failed test 'the summarizer does
not read past replay'" (got 'f', expected 't').
With v4-0001..0003 applied, the same three tests pass. So the tests
do catch the problem on unpatched master.
I also tried a manual run (primary and standby with
recovery_target_lsn and recovery_target_action=promote,
summarize_wal=on, extra WAL after the target, then promotion, full
plus incremental backup and pg_combinebackup). It looked fine with the
series, but gave identical output on unpatched master, so I did not
manage to reproduce the race outside the TAP tests.
Two small nits (confirmed in the patches):
1. The commit message of 0003 mentions t/014_summary_past_switch.pl
and t/015_truncation_after_target.pl, but the files are
015_summary_past_switch.pl and 016_truncation_after_target.pl.
2. The header comment of t/016_truncation_after_target.pl still says
"A standby can summarize WAL past its recovery target", which no
longer matches what 0003 does.
Not tested: backpatching to 17/18, meson builds, Windows, an old
on-disk summary that crosses a switch point (the 0002 check) outside
the TAP test, and builds with ICU.
Thanks again,
João Rito
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2026-11-12 10:28:51 | Re: reconsider_full_join_clause fails to consider if COALESCE() arguments are NULL-preserving |
| Previous Message | Bertrand Drouvot | 2026-11-12 10:06:02 | Re: Add a hook for handling logical decoding messages on subscribers. |