mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Minor code tweaks
This commit is contained in:
@@ -180,8 +180,6 @@ establish_db_connection_by_params(const char *keywords[], const char *values[],
|
|||||||
const bool exit_on_error)
|
const bool exit_on_error)
|
||||||
{
|
{
|
||||||
PGconn *conn;
|
PGconn *conn;
|
||||||
bool replication_connection = false;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Connect to the database using the provided parameters */
|
/* Connect to the database using the provided parameters */
|
||||||
conn = PQconnectdbParams(keywords, values, true);
|
conn = PQconnectdbParams(keywords, values, true);
|
||||||
@@ -199,6 +197,9 @@ establish_db_connection_by_params(const char *keywords[], const char *values[],
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
bool replication_connection = false;
|
||||||
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set "synchronous_commit" to "local" in case synchronous replication is in
|
* set "synchronous_commit" to "local" in case synchronous replication is in
|
||||||
* use (provided this is not a replication connection)
|
* use (provided this is not a replication connection)
|
||||||
@@ -487,6 +488,7 @@ param_list_to_string(t_conninfo_param_list *param_list)
|
|||||||
if (c > 0)
|
if (c > 0)
|
||||||
appendPQExpBufferChar(&conninfo_buf, ' ');
|
appendPQExpBufferChar(&conninfo_buf, ' ');
|
||||||
|
|
||||||
|
/* XXX escape value */
|
||||||
appendPQExpBuffer(&conninfo_buf,
|
appendPQExpBuffer(&conninfo_buf,
|
||||||
"%s=%s",
|
"%s=%s",
|
||||||
param_list->keywords[c],
|
param_list->keywords[c],
|
||||||
|
|||||||
Reference in New Issue
Block a user