standby switchover: improve directory check failure handling

It's possible that the remote data directory check will fail if e.g.
connection configuration is not consistent across all nodes. This
modification ensures a database error connection is reported, rather
than a spurios issue with the data directory configuration.
This commit is contained in:
Ian Barwick
2020-04-15 10:39:30 +09:00
parent 78f89a4d47
commit 32dde4eaaf
3 changed files with 84 additions and 18 deletions

View File

@@ -766,7 +766,7 @@ do_node_check(void)
{
if (runtime_options.output_mode == OM_OPTFORMAT)
{
exit_optformat_error("CONNINFO_PARSE_ERROR",
exit_optformat_error("CONNINFO_PARSE",
ERR_BAD_CONFIG);
}
@@ -804,7 +804,7 @@ do_node_check(void)
*/
if (PQstatus(conn) != CONNECTION_OK)
{
exit_optformat_error("CONNECTION_ERROR",
exit_optformat_error("DB_CONNECTION",
ERR_DB_CONN);
}