1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-25 00:16:54 +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:
David Steele
2019-08-01 15:38:27 -04:00
parent f9e1f3a798
commit e4901d50d5
20 changed files with 1180 additions and 12 deletions

View File

@ -26,6 +26,21 @@ PostgreSQL version constants
#define PG_VERSION_MAX PG_VERSION_11
/***********************************************************************************************************************************
Version where various PostgreSQL capabilities were introduced
***********************************************************************************************************************************/
// application_name can be set to show the application name in pg_stat_activity
#define PG_VERSION_APPLICATION_NAME PG_VERSION_90
// pg_is_in_recovery() supported
#define PG_VERSION_HOT_STANDBY PG_VERSION_91
// pg_create_restore_point() supported
#define PG_VERSION_RESTORE_POINT PG_VERSION_91
// xlog was renamed to wal
#define PG_VERSION_WAL_RENAME PG_VERSION_10
/***********************************************************************************************************************************
PostgreSQL version string constants for use in error messages
***********************************************************************************************************************************/