1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 15:41:11 +03:00

PostgreSQL 17 Support.

Add catalog version and WAL magic for PostgreSQL 17.
This commit is contained in:
David Steele
2024-04-18 10:56:24 +10:00
committed by GitHub
parent c8cf8e1f2b
commit fb22f04555
13 changed files with 82 additions and 12 deletions

View File

@ -61,6 +61,7 @@ testRun(void)
"HINT: is this version of PostgreSQL supported?");
TEST_RESULT_UINT(pgControlVersion(PG_VERSION_94), 942, "9.4 control version");
TEST_RESULT_UINT(pgControlVersion(PG_VERSION_11), 1100, "11 control version");
TEST_RESULT_UINT(pgControlVersion(PG_VERSION_17), 1300, "17 control version");
}
// *****************************************************************************************************************************
@ -146,7 +147,7 @@ testRun(void)
pgControlFromFile(storageTest, NULL), FormatError,
"wal segment size is 47 but must be a power of two between 1048576 and 1073741824 inclusive");
HRN_PG_CONTROL_PUT(storageTest, PG_VERSION_11, .walSegmentSize = (unsigned int)2 * 1024 * 1024 * 1024);
HRN_PG_CONTROL_PUT(storageTest, PG_VERSION_17, .walSegmentSize = (unsigned int)2 * 1024 * 1024 * 1024);
TEST_ERROR(
pgControlFromFile(storageTest, NULL), FormatError,
@ -231,13 +232,13 @@ testRun(void)
TEST_RESULT_UINT(info.pageSize, pgPageSize16, "check page size");
HRN_PG_CONTROL_PUT(
storageTest, PG_VERSION_16, .systemId = 0xEFEFEFEFEF, .catalogVersion = hrnPgCatalogVersion(PG_VERSION_16),
storageTest, PG_VERSION_17, .systemId = 0xEFEFEFEFEF, .catalogVersion = hrnPgCatalogVersion(PG_VERSION_17),
.checkpoint = 0xAABBAABBEEFFEEFF, .timeline = 88, .pageSize = pgPageSize32);
TEST_ASSIGN(info, pgControlFromFile(storageTest, NULL), "get control info");
TEST_RESULT_UINT(info.systemId, 0xEFEFEFEFEF, " check system id");
TEST_RESULT_UINT(info.version, PG_VERSION_16, "check version");
TEST_RESULT_UINT(info.catalogVersion, 202307071, "check catalog version");
TEST_RESULT_UINT(info.systemId, 0xEFEFEFEFEF, "check system id");
TEST_RESULT_UINT(info.version, PG_VERSION_17, "check version");
TEST_RESULT_UINT(info.catalogVersion, 202404021, "check catalog version");
TEST_RESULT_UINT(info.checkpoint, 0xAABBAABBEEFFEEFF, "check checkpoint");
TEST_RESULT_UINT(info.timeline, 88, "check timeline");
TEST_RESULT_UINT(info.pageSize, pgPageSize32, "check page size");