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

Require storage when calling pgControlFromFile().

Previously storageLocal() was being used internally but loading pg_control from remote storage is often required.

Also, storagePg() is more appropriate than storageLocal() for all current usage.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2019-08-21 11:29:30 -04:00
committed by David Steele
parent 286a106ae4
commit 6a09d9294d
8 changed files with 31 additions and 27 deletions

View File

@ -8,6 +8,7 @@ PostgreSQL Interface
#include <sys/types.h>
#include "common/type/string.h"
#include "storage/storage.h"
/***********************************************************************************************************************************
Defines for various Postgres paths and files
@ -72,7 +73,7 @@ typedef struct PgWal
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
PgControl pgControlFromFile(const String *pgPath);
PgControl pgControlFromFile(const Storage *storage, const String *pgPath);
PgControl pgControlFromBuffer(const Buffer *controlFile);
unsigned int pgVersionFromStr(const String *version);
String *pgVersionToStr(unsigned int version);