1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

Remove most references to PostgreSQL control and catalog versions.

The control and catalog versions were stored a variety of places in the optimistic hope that they would be useful.  In fact they never were.

We can't remove them from the backup.info and backup.manifest files due to backwards compatibility concerns, but we can at least avoid loading and storing them in C structures.

Add functions to the PostgreSQL interface which will return the control and catalog versions for any supported version of PostgreSQL to allow backwards compatibility for backup.info and backup.manifest.  These functions will be useful in other ways, e.g. generating the tablespace identifier in PostgreSQL >= 9.0.
This commit is contained in:
David Steele
2019-09-07 18:04:39 -04:00
parent 843a602080
commit 0a96764cb8
16 changed files with 214 additions and 153 deletions

View File

@ -53,9 +53,6 @@ typedef struct PgControl
unsigned int version;
uint64_t systemId;
uint32_t controlVersion;
uint32_t catalogVersion;
unsigned int pageSize;
unsigned int walSegmentSize;
@ -74,8 +71,10 @@ typedef struct PgWal
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
uint32_t pgCatalogVersion(unsigned int pgVersion);
PgControl pgControlFromFile(const Storage *storage, const String *pgPath);
PgControl pgControlFromBuffer(const Buffer *controlFile);
uint32_t pgControlVersion(unsigned int pgVersion);
unsigned int pgVersionFromStr(const String *version);
String *pgVersionToStr(unsigned int version);