]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Allow WAL summarization to back up when timeline changes.
authorRobert Haas <rhaas@postgresql.org>
Fri, 26 Jul 2024 13:50:31 +0000 (09:50 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 26 Jul 2024 13:59:39 +0000 (09:59 -0400)
commitc7cfbc5157fec24704ea102f113d97193ffe5f7f
treef43edc01285c96d17f1b447bfd7c4c5f2487c17f
parentc0c005070817352e217baa430b04161890d9af5a
Allow WAL summarization to back up when timeline changes.

The old code believed that it was not possible to switch timelines
without first replaying all of the WAL from the old timeline, but
that turns out to be false, as demonstrated by an example from Fujii
Masao. As a result, it assumed that summarization would always
continue from the LSN where summarization previously ended. But in
fact, when a timeline switch occurs without replaying all the WAL
from the previous timeline, we can need to back up to an earlier
LSN. Adjust accordingly.

Discussion: https://postgr.es/m/CA+TgmoZGEsZodXC4f=XZNkAeyuDmWTSkpkjCEOcF19Am0mt_OA@mail.gmail.com
src/backend/postmaster/walsummarizer.c