mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
simple past of set is set
This commit is contained in:
@@ -214,7 +214,7 @@ pg_version(PGconn *conn, char* major_version)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
guc_setted(PGconn *conn, const char *parameter, const char *op,
|
guc_set(PGconn *conn, const char *parameter, const char *op,
|
||||||
const char *value)
|
const char *value)
|
||||||
{
|
{
|
||||||
PGresult *res;
|
PGresult *res;
|
||||||
@@ -243,11 +243,11 @@ guc_setted(PGconn *conn, const char *parameter, const char *op,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just like guc_setted except with an extra parameter containing the name of
|
* Just like guc_set except with an extra parameter containing the name of
|
||||||
* the pg datatype so that the comparison can be done properly.
|
* the pg datatype so that the comparison can be done properly.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
guc_setted_typed(PGconn *conn, const char *parameter, const char *op,
|
guc_set_typed(PGconn *conn, const char *parameter, const char *op,
|
||||||
const char *value, const char *datatype)
|
const char *value, const char *datatype)
|
||||||
{
|
{
|
||||||
PGresult *res;
|
PGresult *res;
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ int is_standby(PGconn *conn);
|
|||||||
int is_witness(PGconn *conn, char *schema, char *cluster, int node_id);
|
int is_witness(PGconn *conn, char *schema, char *cluster, int node_id);
|
||||||
bool is_pgup(PGconn *conn, int timeout);
|
bool is_pgup(PGconn *conn, int timeout);
|
||||||
char *pg_version(PGconn *conn, char* major_version);
|
char *pg_version(PGconn *conn, char* major_version);
|
||||||
int guc_setted(PGconn *conn, const char *parameter, const char *op,
|
int guc_set(PGconn *conn, const char *parameter, const char *op,
|
||||||
const char *value);
|
const char *value);
|
||||||
int guc_setted_typed(PGconn *conn, const char *parameter, const char *op,
|
int guc_set_typed(PGconn *conn, const char *parameter, const char *op,
|
||||||
const char *value, const char *datatype);
|
const char *value, const char *datatype);
|
||||||
|
|
||||||
const char *get_cluster_size(PGconn *conn);
|
const char *get_cluster_size(PGconn *conn);
|
||||||
|
|||||||
8
repmgr.c
8
repmgr.c
@@ -851,7 +851,7 @@ do_standby_clone(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* And check if it is well configured */
|
/* And check if it is well configured */
|
||||||
i = guc_setted(conn, "wal_level", "=", "hot_standby");
|
i = guc_set(conn, "wal_level", "=", "hot_standby");
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
@@ -860,7 +860,7 @@ do_standby_clone(void)
|
|||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = guc_setted_typed(conn, "wal_keep_segments", ">=", runtime_options.wal_keep_segments, "integer");
|
i = guc_set_typed(conn, "wal_keep_segments", ">=", runtime_options.wal_keep_segments, "integer");
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
@@ -869,7 +869,7 @@ do_standby_clone(void)
|
|||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = guc_setted(conn, "archive_mode", "=", "on");
|
i = guc_set(conn, "archive_mode", "=", "on");
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
@@ -878,7 +878,7 @@ do_standby_clone(void)
|
|||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = guc_setted(conn, "hot_standby", "=", "on");
|
i = guc_set(conn, "hot_standby", "=", "on");
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user