| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | shihao zhong <zhong950419(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Raja Sai pranav <rajasaipranav0(at)gmail(dot)com>, manuelreyesbravo(at)gmail(dot)com, robertmhaas(at)gmail(dot)com, masaofujii(at)gmail(dot)com, darianlepikhova(at)gmail(dot)com, ayushtiwarislg01(at)gmail(dot)com |
| Subject: | Re: Re: Assertion failure in WAL summarizer |
| Date: | 2026-11-15 21:22:59 |
| Message-ID: | CAN4CZFOEODqSJg=S=Dv_4oUeFxNojpqsKpP=yaZZOtfq+1HpDQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
0002 misses an old summary that ends exactly at the switch point
The 0003 commit message says that a summary written before a minor
update "can still be on disk ... and the check added by the previous
commit still refuses it". That holds for a summary that crosses the
switch point, but not when the old summarizer was in the middle of a
summary at promotion time:
* It has already added the records past the target to its block reference table
* then summarizer_read_local_xlog_page() moves read_upto back to the
switch point
* SummarizeWAL() hits end of WAL and writes the file as [start, switch
point], with the truncation from past the target inside it
* ws->end_lsn == tli_end_lsn, so 0002 doesn't flag it
Reproduction steps:
primary: summarize_wal = on, autovacuum = off
CREATE TABLE t (id int, v int, pad text STORAGE PLAIN);
INSERT INTO t SELECT g, 0, repeat('x', 4096) FROM generate_series(1,4) g;
VACUUM t;
pg_basebackup -D full -c fast -R
UPDATE t SET v = 1 WHERE id = 4;
SELECT pg_current_wal_insert_lsn(); -- recovery_target_lsn for the standby
standby from the same backup: summarize_wal = on,
recovery_target_action = 'pause', running the old summarizer
primary: DELETE FROM t WHERE id > 1; VACUUM t;
wait for the standby to pause and its summarizer to catch up with the
received WAL
pg_ctl -m immediate stop the primary, promote the standby
restart the standby on 18 + v5, pg_basebackup
--incremental=full/backup_manifest, pg_combinebackup
Result:
00000002.history: 1 0/030051F0 after LSN 0/03004168
timeline 1 summary: 0/02000028 - 0/030051F0, limit block 1 for t
restored rows: 1|0 2|0 3|0 4|0
promoted server rows: 1|0 2|0 3|0 4|1
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jianqiao Han | 2026-11-16 00:00:00 | Re: [PATCH] Normalize numeric/bigint scientific notation after rounding |
| Previous Message | Zsolt Parragi | 2026-11-15 21:15:36 | Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned |