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 @@ + + + + + +

PostgreSQL 19beta4 support.

+
+ 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");