mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Fix some typos and replace the variable Inrecovery with
the function RecoveryInProgress() in the function sql_utils/repmgr_wrapper_funcs.c:last_xlog_replay_timestamp()
This commit is contained in:
2
config.c
2
config.c
@@ -31,7 +31,7 @@ parse_config(char *cluster_name, int *node, char *conninfo)
|
|||||||
|
|
||||||
/* Copy into correct entry in parameters struct */
|
/* Copy into correct entry in parameters struct */
|
||||||
if (strcmp(name, "cluster") == 0)
|
if (strcmp(name, "cluster") == 0)
|
||||||
*node = atoi(value);
|
strncpy (cluster_name, value, MAXLEN);
|
||||||
else if (strcmp(name, "node") == 0)
|
else if (strcmp(name, "node") == 0)
|
||||||
*node = atoi(value);
|
*node = atoi(value);
|
||||||
else if (strcmp(name, "conninfo") == 0)
|
else if (strcmp(name, "conninfo") == 0)
|
||||||
|
|||||||
2
main.c
2
main.c
@@ -123,7 +123,7 @@ getPrimaryConnection(void)
|
|||||||
for (i = 0; i < PQntuples(res1); i++)
|
for (i = 0; i < PQntuples(res1); i++)
|
||||||
{
|
{
|
||||||
primaryId = atoi(PQgetvalue(res1, i, 0));
|
primaryId = atoi(PQgetvalue(res1, i, 0));
|
||||||
strcmp(primaryConninfo, PQgetvalue(res1, i, 2));
|
strcpy(primaryConninfo, PQgetvalue(res1, i, 2));
|
||||||
primaryConn = establishDBConnection(primaryConninfo, false);
|
primaryConn = establishDBConnection(primaryConninfo, false);
|
||||||
|
|
||||||
res2 = PQexec(primaryConn, "SELECT pg_is_in_recovery()");
|
res2 = PQexec(primaryConn, "SELECT pg_is_in_recovery()");
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ last_xlog_replay_timestamp(PG_FUNCTION_ARGS)
|
|||||||
TimestampTz rTime;
|
TimestampTz rTime;
|
||||||
bool fromStream;
|
bool fromStream;
|
||||||
|
|
||||||
if (!InRecovery)
|
if (!RecoveryInProgress())
|
||||||
PG_RETURN_NULL();
|
PG_RETURN_NULL();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user