1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Fix inconsistent group display names in messages.

In other instances there are no dashes, e.g. repo1 or pg1. Make these messages match.
This commit is contained in:
David Steele 2022-01-09 19:43:44 -05:00
parent 5f78a5fc18
commit e4b48eb430
4 changed files with 19 additions and 7 deletions

View File

@ -40,6 +40,18 @@
<p>Remove support for <proper>PostgreSQL</proper> <id>8.3</id>/<id>8.4</id>.</p>
</release-item>
</release-improvement-list>
<release-development-list>
<release-item>
<commit subject="Fix inconsistent group display names in messages."/>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>
</release-item-contributor-list>
<p>Configuration refactoring.</p>
</release-item>
</release-development-list>
</release-core-list>
<release-doc-list>

View File

@ -89,7 +89,7 @@ dbGet(bool primaryOnly, bool primaryRequired, bool standbyRequired)
CATCH_ANY()
{
LOG_WARN_FMT(
"unable to check pg-%u: [%s] %s", cfgOptionGroupIdxToKey(cfgOptGrpPg, pgIdx), errorTypeName(errorType()),
"unable to check pg%u: [%s] %s", cfgOptionGroupIdxToKey(cfgOptGrpPg, pgIdx), errorTypeName(errorType()),
errorMessage());
db = NULL;
}

View File

@ -51,7 +51,7 @@ testRun(void)
TEST_ERROR(cmdCheck(), ConfigError, "no database found\nHINT: check indexed pg-path/pg-host configurations");
TEST_RESULT_LOG(
"P00 WARN: unable to check pg-1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432': error");
"P00 WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432': error");
//--------------------------------------------------------------------------------------------------------------------------
TEST_TITLE("standby only, repo local - fail to find primary database");

View File

@ -254,7 +254,7 @@ testRun(void)
TEST_ERROR(dbGet(true, true, false), DbConnectError, "unable to find primary cluster - cannot proceed");
TEST_RESULT_LOG(
"P00 WARN: unable to check pg-1: [DbQueryError] unable to select some rows from pg_settings\n"
"P00 WARN: unable to check pg1: [DbQueryError] unable to select some rows from pg_settings\n"
" HINT: is the backup running as the postgres user?\n"
" HINT: is the pg_read_all_settings role assigned for PostgreSQL >= 10?");
@ -702,7 +702,7 @@ testRun(void)
TEST_ERROR(dbGet(true, true, false), DbConnectError, "unable to find primary cluster - cannot proceed");
TEST_RESULT_LOG(
"P00 WARN: unable to check pg-1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432 user='bob'':"
"P00 WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432 user='bob'':"
" error");
// -------------------------------------------------------------------------------------------------------------------------
@ -846,7 +846,7 @@ testRun(void)
{
HRNPQ_MACRO_OPEN_GE_92(1, "dbname='postgres' port=5432", PG_VERSION_92, TEST_PATH "/pg1", true, NULL, NULL),
// pg-4 error
// pg4 error
{.session = 4, .function = HRNPQ_CONNECTDB, .param = "[\"dbname='postgres' port=5433\"]"},
{.session = 4, .function = HRNPQ_STATUS, .resultInt = CONNECTION_BAD},
{.session = 4, .function = HRNPQ_ERRORMESSAGE, .resultZ = "error"},
@ -867,8 +867,8 @@ testRun(void)
hrnLogReplaceAdd("(could not connect to server|connection to server on socket).*$", NULL, "PG ERROR", false);
TEST_RESULT_LOG(
"P00 WARN: unable to check pg-4: [DbConnectError] unable to connect to 'dbname='postgres' port=5433': error\n"
"P00 WARN: unable to check pg-5: [DbConnectError] raised from remote-0 ssh protocol on 'localhost':"
"P00 WARN: unable to check pg4: [DbConnectError] unable to connect to 'dbname='postgres' port=5433': error\n"
"P00 WARN: unable to check pg5: [DbConnectError] raised from remote-0 ssh protocol on 'localhost':"
" unable to connect to 'dbname='postgres' port=5432': [PG ERROR]");
TEST_RESULT_INT(result.primaryIdx, 3, "check primary idx");