mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Replace HRNPQ_MACRO_OPEN_92() test macro with HRNPQ_MACRO_OPEN_GE_92().
This commit is contained in:
parent
f55cb386d4
commit
ce98e326e1
@ -506,10 +506,6 @@ Macros to simplify dbOpen() for specific database versions
|
||||
HRNPQ_MACRO_SET_APPLICATION_NAME(sessionParam), \
|
||||
HRNPQ_MACRO_IS_STANDBY_QUERY(sessionParam, standbyParam)
|
||||
|
||||
// ??? This is really just a special case of the above and should be replaced by it
|
||||
#define HRNPQ_MACRO_OPEN_92(sessionParam, connectParam, pgPathParam, standbyParam, archiveMode, archiveCommand) \
|
||||
HRNPQ_MACRO_OPEN_GE_92(sessionParam, connectParam, PG_VERSION_92, pgPathParam, standbyParam, archiveMode, archiveCommand)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Data type constants
|
||||
***********************************************************************************************************************************/
|
||||
|
@ -65,7 +65,7 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
@ -86,8 +86,8 @@ testRun(void)
|
||||
// Two standbys found but no primary
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -108,7 +108,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
@ -130,7 +130,7 @@ testRun(void)
|
||||
// Primary database connection ok
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
@ -161,8 +161,8 @@ testRun(void)
|
||||
// Standby database path doesn't match pg_control
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", testPath(), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", strPtr(pg8Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, testPath(), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, strPtr(pg8Path), false, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -181,8 +181,8 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", strPtr(pg8Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, strPtr(pg8Path), false, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -239,8 +239,8 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", strPtr(pg8Path), false, "off", NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, strPtr(pg8Path), false, "off", NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
@ -264,7 +264,7 @@ testRun(void)
|
||||
// Error when WAL segment not found
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_CREATE_RESTORE_POINT(1, "1/1"),
|
||||
HRNPQ_MACRO_WAL_SWITCH(1, "xlog", "000000010000000100000001"),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -285,7 +285,7 @@ testRun(void)
|
||||
// WAL segment is found
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_CREATE_RESTORE_POINT(1, "1/1"),
|
||||
HRNPQ_MACRO_WAL_SWITCH(1, "xlog", "000000010000000100000001"),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -362,8 +362,8 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", "/badpath", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, "/badpath", true, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
@ -427,7 +427,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, "always", NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, "always", NULL),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
@ -391,7 +391,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
||||
@ -401,7 +401,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
||||
@ -417,7 +417,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
||||
@ -437,7 +437,8 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", strPtr(strNewFmt("%s/pg2", testPath())), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(
|
||||
1, "dbname='postgres' port=5432", PG_VERSION_92, strPtr(strNewFmt("%s/pg2", testPath())), false, NULL, NULL),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
||||
@ -470,8 +471,8 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", testPath(), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(2, "dbname='postgres' port=5434", strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, testPath(), true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(2, "dbname='postgres' port=5434", PG_VERSION_92, strPtr(pg1Path), false, NULL, NULL),
|
||||
HRNPQ_MACRO_DONE()
|
||||
});
|
||||
|
||||
|
@ -546,8 +546,8 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -561,8 +561,8 @@ testRun(void)
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5433", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5433", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CLOSE(8),
|
||||
HRNPQ_MACRO_CLOSE(1),
|
||||
@ -596,7 +596,7 @@ testRun(void)
|
||||
|
||||
harnessPqScriptSet((HarnessPq [])
|
||||
{
|
||||
HRNPQ_MACRO_OPEN_92(1, "dbname='postgres' port=5432", "/pgdata", true, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, "/pgdata", true, NULL, NULL),
|
||||
|
||||
// pg-4 error
|
||||
{.session = 4, .function = HRNPQ_CONNECTDB, .param = "[\"dbname='postgres' port=5433\"]"},
|
||||
@ -604,7 +604,7 @@ testRun(void)
|
||||
{.session = 4, .function = HRNPQ_ERRORMESSAGE, .resultZ = "error"},
|
||||
{.session = 4, .function = HRNPQ_FINISH},
|
||||
|
||||
HRNPQ_MACRO_OPEN_92(8, "dbname='postgres' port=5434", "/pgdata", false, NULL, NULL),
|
||||
HRNPQ_MACRO_OPEN_GE_92(8, "dbname='postgres' port=5434", PG_VERSION_92, "/pgdata", false, NULL, NULL),
|
||||
|
||||
HRNPQ_MACRO_CREATE_RESTORE_POINT(8, "2/3"),
|
||||
HRNPQ_MACRO_WAL_SWITCH(8, "xlog", "000000010000000200000003"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user