mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
Fix slot name
This commit is contained in:
@@ -307,7 +307,8 @@ guc_set_typed(PGconn *conn, const char *parameter, const char *op,
|
|||||||
char sqlquery[QUERY_STR_LEN];
|
char sqlquery[QUERY_STR_LEN];
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
|
|
||||||
sqlquery_snprintf(sqlquery, "SELECT true FROM pg_settings "
|
sqlquery_snprintf(sqlquery,
|
||||||
|
"SELECT true FROM pg_settings "
|
||||||
" WHERE name = '%s' AND setting::%s %s '%s'::%s",
|
" WHERE name = '%s' AND setting::%s %s '%s'::%s",
|
||||||
parameter, datatype, op, value, datatype);
|
parameter, datatype, op, value, datatype);
|
||||||
|
|
||||||
@@ -934,7 +935,7 @@ create_node_record(PGconn *conn, char *action, int node, char *type, int upstrea
|
|||||||
maxlen_snprintf(upstream_node_id, "%i", upstream_node);
|
maxlen_snprintf(upstream_node_id, "%i", upstream_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(slot_name == NULL)
|
if(slot_name != NULL && slot_name[0])
|
||||||
{
|
{
|
||||||
maxlen_snprintf(slot_name_buf, "'%s'", slot_name);
|
maxlen_snprintf(slot_name_buf, "'%s'", slot_name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user