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:
postgres
2010-09-14 03:05:28 -05:00
parent 7ec3485811
commit d728ef0eef
3 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ parse_config(char *cluster_name, int *node, char *conninfo)
/* Copy into correct entry in parameters struct */
if (strcmp(name, "cluster") == 0)
*node = atoi(value);
strncpy (cluster_name, value, MAXLEN);
else if (strcmp(name, "node") == 0)
*node = atoi(value);
else if (strcmp(name, "conninfo") == 0)

2
main.c
View File

@@ -123,7 +123,7 @@ getPrimaryConnection(void)
for (i = 0; i < PQntuples(res1); i++)
{
primaryId = atoi(PQgetvalue(res1, i, 0));
strcmp(primaryConninfo, PQgetvalue(res1, i, 2));
strcpy(primaryConninfo, PQgetvalue(res1, i, 2));
primaryConn = establishDBConnection(primaryConninfo, false);
res2 = PQexec(primaryConn, "SELECT pg_is_in_recovery()");

View File

@@ -21,7 +21,7 @@ last_xlog_replay_timestamp(PG_FUNCTION_ARGS)
TimestampTz rTime;
bool fromStream;
if (!InRecovery)
if (!RecoveryInProgress())
PG_RETURN_NULL();
else
{