You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Add Db object to encapsulate PostgreSQL queries and commands.
Migrate functionality from the Perl Db module to C. For now this is just enough to implement the WAL switch check. Add the dbGet() helper function to get Db objects easily. Create macros in harnessPq to make writing pq scripts easier by grouping commonly used functions together. Reviewed by Cynthia Shang.
This commit is contained in:
@ -17,6 +17,17 @@ Defines for various Postgres paths and files
|
||||
#define PG_PATH_ARCHIVE_STATUS "archive_status"
|
||||
#define PG_PATH_GLOBAL "global"
|
||||
|
||||
#define PG_NAME_WAL "wal"
|
||||
STRING_DECLARE(PG_NAME_WAL_STR);
|
||||
#define PG_NAME_XLOG "xlog"
|
||||
STRING_DECLARE(PG_NAME_XLOG_STR);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Name of default PostgreSQL database used for running all queries and commands
|
||||
***********************************************************************************************************************************/
|
||||
#define PG_DB_POSTGRES "postgres"
|
||||
STRING_DECLARE(PG_DB_POSTGRES_STR);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Define default page size
|
||||
|
||||
@ -69,6 +80,8 @@ String *pgVersionToStr(unsigned int version);
|
||||
PgWal pgWalFromFile(const String *walFile);
|
||||
PgWal pgWalFromBuffer(const Buffer *walBuffer);
|
||||
|
||||
const String *pgWalName(unsigned int pgVersion);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Test Functions
|
||||
***********************************************************************************************************************************/
|
||||
|
Reference in New Issue
Block a user