pgbackrest.git / summary / log / commit / refs
commit 3c821e6ba235b3dbca5ea21efda5fe9765d5b3a4
Author: David Steele <david@pgbackrest.org>
Date: Sun Sep 27 09:11:20 2026 +0000
PostgreSQL 19beta4 support.
Beta4 reverted online data checksum transitions, which removed the in-progress checksum states and the checkpoint checksum state and bumped PG_CONTROL_VERSION:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c05d5ce12366f1008e95b09a0a9b08a49818b0e1
A follow-up to the revert bumped XLOG_PAGE_MAGIC:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=4a9a6c5a69c45ba74c694ccb1ff5921dd09a6676
Beta4 also added data_checksum_version_init to pg_control:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=aaf8b9989f7aaeb6594122caee1eea6c87e10655
The page checksum version in pg_control is again limited to 0 and 1, so check it against PG_DATA_CHECKSUM_VERSION for all versions and remove the handling of the in-progress states added for PostgreSQL 19.
doc/xml/release/2020s/2026/2.60.0.xml | 8 ++++++++
src/postgres/interface.c | 10 ++--------
src/postgres/interface/static.vendor.h | 11 +++--------
src/postgres/interface/version.vendor.h | 15 +++++++++------
test/container.yaml | 6 +++---
test/src/module/postgres/interfaceTest.c | 9 ---------
6 files changed, 25 insertions(+), 34 deletions(-)
diff --git a/doc/xml/release/2020s/2026/2.60.0.xml b/doc/xml/release/2020s/2026/2.60.0.xml
index 59e338d36..92913b56b 100644
--- a/doc/xml/release/2020s/2026/2.60.0.xml
+++ b/doc/xml/release/2020s/2026/2.60.0.xml
@@ -84,6 +84,14 @@
</release-bug-list>
<release-feature-list>
+ <release-item>
+ <release-item-contributor-list>
+ <release-item-contributor id="david.steele"/>
+ </release-item-contributor-list>
+
+ <p><proper>PostgreSQL 19beta4</proper> support.</p>
+ </release-item>
+
<release-item>
<github-issue id="2687"/>
<github-pull-request id="2833"/>
diff --git a/src/postgres/interface.c b/src/postgres/interface.c
index 5b402e88b..1bead8d27 100644
--- a/src/postgres/interface.c
+++ b/src/postgres/interface.c
@@ -318,18 +318,12 @@ pgControlFromBuffer(const Buffer *const controlFile, const String *const pgVersi
pgPageSizeCheck(result.pageSize);
// Check the checksum version
- if ((result.version <= PG_VERSION_18 && result.pageChecksumVersion > PG_DATA_CHECKSUM_VERSION) ||
- (result.version > PG_VERSION_18 && result.pageChecksumVersion > PG_DATA_CHECKSUM_INPROGRESS_ON))
+ if (result.pageChecksumVersion > PG_DATA_CHECKSUM_VERSION)
{
THROW_FMT(
- FormatError, "page checksum version is %u but must be <= %d", result.pageChecksumVersion,
- result.version <= PG_VERSION_18 ? PG_DATA_CHECKSUM_VERSION : PG_DATA_CHECKSUM_INPROGRESS_ON);
+ FormatError, "page checksum version is %u but must be <= %d", result.pageChecksumVersion, PG_DATA_CHECKSUM_VERSION);
}
- // Clear checksum version values that represent clusters with incomplete checksums
- if (result.version > PG_VERSION_18 && result.pageChecksumVersion > PG_DATA_CHECKSUM_VERSION)
- result.pageChecksumVersion = 0;
-
FUNCTION_LOG_RETURN(PG_CONTROL, result);
}
diff --git a/src/postgres/interface/static.vendor.h b/src/postgres/interface/static.vendor.h
index 980e2e855..1112e5479 100644
--- a/src/postgres/interface/static.vendor.h
+++ b/src/postgres/interface/static.vendor.h
@@ -62,19 +62,14 @@ Types from src/include/storage/checksum.h
// ChecksumStateType enum
// ---------------------------------------------------------------------------------------------------------------------------------
/*
- * Checksum state 0 is used for when data checksums are disabled (OFF).
- * PG_DATA_CHECKSUM_INPROGRESS_{ON|OFF} defines that data checksums are either
- * currently being enabled or disabled, and PG_DATA_CHECKSUM_VERSION defines
- * that data checksums are enabled. The ChecksumStateType is stored in
- * pg_control so changing requires a catversion bump, and the values cannot
- * be reordered. New states must be added at the end.
+ * Checksum state 0 is used for when data checksums are disabled (OFF), and
+ * PG_DATA_CHECKSUM_VERSION defines that data checksums are enabled. New
+ * states must be added at the end.
*/
typedef enum ChecksumStateType
{
PG_DATA_CHECKSUM_OFF = 0,
PG_DATA_CHECKSUM_VERSION = 1,
- PG_DATA_CHECKSUM_INPROGRESS_OFF = 2,
- PG_DATA_CHECKSUM_INPROGRESS_ON = 3,
} ChecksumStateType;
/***********************************************************************************************************************************
diff --git a/src/postgres/interface/version.vendor.h b/src/postgres/interface/version.vendor.h
index c96259321..c8a9863d3 100644
--- a/src/postgres/interface/version.vendor.h
+++ b/src/postgres/interface/version.vendor.h
@@ -296,7 +296,7 @@ Types from src/include/catalog/pg_control.h
#elif PG_VERSION >= PG_VERSION_19
/* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION 1902
+#define PG_CONTROL_VERSION 1905
#elif PG_VERSION >= PG_VERSION_18
@@ -388,9 +388,6 @@ typedef struct CheckPoint
* set to InvalidTransactionId.
*/
TransactionId oldestActiveXid;
-
- /* data checksums state at the time of the checkpoint */
- uint32 dataChecksumState;
} CheckPoint;
#elif PG_VERSION >= PG_VERSION_17
@@ -694,7 +691,13 @@ typedef struct ControlFileData
bool float8ByVal; /* float8, int8, etc pass-by-value? */
- /* Are data pages protected by checksums? Zero if no checksum version */
+ /*
+ * Data checksum state at cluster initialization. Since the state can be
+ * changed during runtime, we need to store the initial value for system
+ * functions which report initdb settings.
+ */
+ uint32 data_checksum_version_init;
+ /* Current data checksums state */
uint32 data_checksum_version;
/*
@@ -1701,7 +1704,7 @@ Types from src/include/access/xlog_internal.h
#elif PG_VERSION >= PG_VERSION_19
-#define XLOG_PAGE_MAGIC 0xD121 /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD122 /* can be used as WAL version indicator */
#elif PG_VERSION >= PG_VERSION_18
diff --git a/test/container.yaml b/test/container.yaml
index c2463288d..73d83f9c2 100644
--- a/test/container.yaml
+++ b/test/container.yaml
@@ -199,6 +199,6 @@ vm:
revision:
all: 20260710A
- # Bump for PostgreSQL 19beta3
- u24-x86_64: 20260817A
- u24-aarch64: 20260817A
+ # Bump for PostgreSQL 19beta4
+ u24-x86_64: 20260927A
+ u24-aarch64: 20260927A
diff --git a/test/src/module/postgres/interfaceTest.c b/test/src/module/postgres/interfaceTest.c
index 5f8ceb41e..cefa6f9e2 100644
--- a/test/src/module/postgres/interfaceTest.c
+++ b/test/src/module/postgres/interfaceTest.c
@@ -161,15 +161,6 @@ testRun(void)
TEST_ERROR(
pgControlFromFile(storageTest, NULL), FormatError, "page checksum version is 2 but must be <= 1");
- HRN_PG_CONTROL_PUT(storageTest, PG_VERSION_19, .pageChecksumVersion = 4);
-
- TEST_ERROR(
- pgControlFromFile(storageTest, NULL), FormatError, "page checksum version is 4 but must be <= 3");
-
- HRN_PG_CONTROL_PUT(storageTest, PG_VERSION_19, .pageChecksumVersion = 3);
-
- TEST_RESULT_UINT(pgControlFromFile(storageTest, NULL).pageChecksumVersion, 0, "incomplete checksums cleared");
-
// -------------------------------------------------------------------------------------------------------------------------
TEST_TITLE("check all valid page sizes");
[parent: 95a14644f30e]