1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-03 00:26:59 +02:00

Add storage parameter to pgWalFromFile().

This commit is contained in:
Cynthia Shang
2020-07-21 16:28:05 -04:00
committed by GitHub
parent ed88293861
commit 78ef442a18
4 changed files with 6 additions and 6 deletions

View File

@ -549,7 +549,7 @@ pgWalFromBuffer(const Buffer *walBuffer)
}
PgWal
pgWalFromFile(const String *walFile)
pgWalFromFile(const String *walFile, const Storage *storage)
{
FUNCTION_LOG_BEGIN(logLevelDebug);
FUNCTION_LOG_PARAM(STRING, walFile);
@ -562,7 +562,7 @@ pgWalFromFile(const String *walFile)
MEM_CONTEXT_TEMP_BEGIN()
{
// Read WAL segment header
Buffer *walBuffer = storageGetP(storageNewReadP(storageLocal(), walFile), .exactSize = PG_WAL_HEADER_SIZE);
Buffer *walBuffer = storageGetP(storageNewReadP(storage, walFile), .exactSize = PG_WAL_HEADER_SIZE);
result = pgWalFromBuffer(walBuffer);
}

View File

@ -128,7 +128,7 @@ unsigned int pgVersionFromStr(const String *version);
String *pgVersionToStr(unsigned int version);
// Get info from WAL header
PgWal pgWalFromFile(const String *walFile);
PgWal pgWalFromFile(const String *walFile, const Storage *storage);
PgWal pgWalFromBuffer(const Buffer *walBuffer);
// Get the tablespace identifier used to distinguish versions in a tablespace directory, e.g. PG_9.0_201008051