1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-06-20 01:17:49 +02:00

Fix incorrect pg_control struct used for PostgreSQL 9.5.

The 9.6 pg_control struct was being used for 9.5. This was not detected by testing because the new field introduced for 9.6 fit into an alignment hole in the 9.5 struct so the size of the struct and offset of all other members did not change. Since the new member was not used there was no impact on functionality.

9.5 is being removed in the next release so the only reason to fix this is to make the diff for that change more sensible, and to document that this happened.
This commit is contained in:
David Steele
2025-11-06 10:21:23 +02:00
parent 1c976ded91
commit 1f2b2778ab
+3 -2
View File
@@ -1395,7 +1395,7 @@ typedef struct ControlFileData
pg_crc32c crc;
} ControlFileData;
#elif PG_VERSION >= PG_VERSION_95
#elif PG_VERSION >= PG_VERSION_96
/*
* Contents of pg_control.
@@ -1627,6 +1627,7 @@ typedef struct ControlFileData
int max_worker_processes;
int max_prepared_xacts;
int max_locks_per_xact;
bool track_commit_timestamp;
/*
* This data is used to check for hardware-architecture compatibility of
@@ -1671,7 +1672,7 @@ typedef struct ControlFileData
uint32 data_checksum_version;
/* CRC of all above ... MUST BE LAST! */
pg_crc32 crc;
pg_crc32c crc;
} ControlFileData;
#endif