pgsql: Remove WAL page header flag XLP_BKP_REMOVABLE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove WAL page header flag XLP_BKP_REMOVABLE
Date: 2026-03-02 05:16:25
Message-ID: E1vwvdp-001v1x-0y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove WAL page header flag XLP_BKP_REMOVABLE

There are no known users of this flag. The last supposed user was
pglesslog, which is the reason why this flag has been introduced in
core, based on an historical search pointing at a8d539f12498.

I have mentioned that we may want to remove this flag back in 2018, due
to zero users of it in core. More recently, Noah has pointed out that
this flag is not safe to use: XLP_BKP_REMOVABLE can be set by the WAL
writer in a lock-free fashion with runningBackups > 0, meaning that some
full-page images could be required but not logged, ultimately corrupting
backups.

Bump XLOG_PAGE_MAGIC.

Author: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Discussion: https://postgr.es/m/20250705001628.c3.nmisch@google.com
Discussion: https://postgr.es/m/CAEze2WhiwKSoAvfUggjDeoeY0-rz9cTpfrHcqvBMmJxv-K_5DA@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xlog.c | 23 -----------------------
src/include/access/xlog_internal.h | 8 +++-----
2 files changed, 3 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-02 07:05:20 pgsql: Check for memset_explicit() and explicit_memset()
Previous Message Michael Paquier 2026-03-02 04:15:24 pgsql: Fix memory allocation size in RegisterExtensionExplainOption()