pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Reject incremental backups based on a backup from a divergent hi
4+ messages / 1 participants
[nested] [flat]

* pgsql: Reject incremental backups based on a backup from a divergent hi
@ 2026-11-03 04:05  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Fujii Masao @ 2026-11-03 04:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject incremental backups based on a backup from a divergent history

After a failover, an incremental backup could accept a prior backup
whose WAL range extends beyond the point where the new primary left the
old timeline. Combining these backups could retain pages from the
abandoned history, producing a corrupt backup that might still recover
and start successfully.

The validation checked the end of the prior backup's final WAL range
against the new backup's start LSN, but not against the timeline's
switch point. This allowed an incompatible prior backup to pass
validation once the new primary had advanced far enough.

Reject incremental backups if the prior backup's final WAL range
extends beyond the timeline's switch point.

Backpatch to v17, where incremental backup was introduced.

Author: Sai Pranav <rajasaipranav0@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAPHduZC9pWm_vjznmhZNFsDZKLimqc6dKXOozLUKZVPs19zbZg@mail.gmail.com
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/316861101e8c5ca48149d368e08ff865dd3ea306

Modified Files
--------------
doc/src/sgml/backup.sgml                    |  7 +++++++
src/backend/backup/basebackup_incremental.c | 13 +++++++++++++
src/bin/pg_combinebackup/t/008_promote.pl   | 29 +++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Reject incremental backups based on a backup from a divergent hi
@ 2026-11-03 04:05  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Fujii Masao @ 2026-11-03 04:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject incremental backups based on a backup from a divergent history

After a failover, an incremental backup could accept a prior backup
whose WAL range extends beyond the point where the new primary left the
old timeline. Combining these backups could retain pages from the
abandoned history, producing a corrupt backup that might still recover
and start successfully.

The validation checked the end of the prior backup's final WAL range
against the new backup's start LSN, but not against the timeline's
switch point. This allowed an incompatible prior backup to pass
validation once the new primary had advanced far enough.

Reject incremental backups if the prior backup's final WAL range
extends beyond the timeline's switch point.

Backpatch to v17, where incremental backup was introduced.

Author: Sai Pranav <rajasaipranav0@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAPHduZC9pWm_vjznmhZNFsDZKLimqc6dKXOozLUKZVPs19zbZg@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/04ea11d0e537312e834b90bd782238c54622b802

Modified Files
--------------
doc/src/sgml/backup.sgml                    |  7 +++++++
src/backend/backup/basebackup_incremental.c | 13 +++++++++++++
src/bin/pg_combinebackup/t/008_promote.pl   | 29 +++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Reject incremental backups based on a backup from a divergent hi
@ 2026-11-03 04:06  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Fujii Masao @ 2026-11-03 04:06 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject incremental backups based on a backup from a divergent history

After a failover, an incremental backup could accept a prior backup
whose WAL range extends beyond the point where the new primary left the
old timeline. Combining these backups could retain pages from the
abandoned history, producing a corrupt backup that might still recover
and start successfully.

The validation checked the end of the prior backup's final WAL range
against the new backup's start LSN, but not against the timeline's
switch point. This allowed an incompatible prior backup to pass
validation once the new primary had advanced far enough.

Reject incremental backups if the prior backup's final WAL range
extends beyond the timeline's switch point.

Backpatch to v17, where incremental backup was introduced.

Author: Sai Pranav <rajasaipranav0@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAPHduZC9pWm_vjznmhZNFsDZKLimqc6dKXOozLUKZVPs19zbZg@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2afbad0cedfd4184bd13d470e7fdc13c94d1ab77

Modified Files
--------------
doc/src/sgml/backup.sgml                    |  7 +++++++
src/backend/backup/basebackup_incremental.c | 13 +++++++++++++
src/bin/pg_combinebackup/t/008_promote.pl   | 29 +++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Reject incremental backups based on a backup from a divergent hi
@ 2026-11-03 04:06  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Fujii Masao @ 2026-11-03 04:06 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject incremental backups based on a backup from a divergent history

After a failover, an incremental backup could accept a prior backup
whose WAL range extends beyond the point where the new primary left the
old timeline. Combining these backups could retain pages from the
abandoned history, producing a corrupt backup that might still recover
and start successfully.

The validation checked the end of the prior backup's final WAL range
against the new backup's start LSN, but not against the timeline's
switch point. This allowed an incompatible prior backup to pass
validation once the new primary had advanced far enough.

Reject incremental backups if the prior backup's final WAL range
extends beyond the timeline's switch point.

Backpatch to v17, where incremental backup was introduced.

Author: Sai Pranav <rajasaipranav0@gmail.com>
Co-authored-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAPHduZC9pWm_vjznmhZNFsDZKLimqc6dKXOozLUKZVPs19zbZg@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ecb43083fe34ebd2b00263c90dcf1ffc63b4c2a4

Modified Files
--------------
doc/src/sgml/backup.sgml                    |  7 +++++++
src/backend/backup/basebackup_incremental.c | 13 +++++++++++++
src/bin/pg_combinebackup/t/008_promote.pl   | 29 +++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-11-03 04:06 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 04:05 pgsql: Reject incremental backups based on a backup from a divergent hi Fujii Masao <fujii@postgresql.org>
2026-11-03 04:05 pgsql: Reject incremental backups based on a backup from a divergent hi Fujii Masao <fujii@postgresql.org>
2026-11-03 04:06 pgsql: Reject incremental backups based on a backup from a divergent hi Fujii Masao <fujii@postgresql.org>
2026-11-03 04:06 pgsql: Reject incremental backups based on a backup from a divergent hi Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox