Skip to content

Commit

Permalink
Fix some typos and replace the variable Inrecovery with
Browse files Browse the repository at this point in the history
the function RecoveryInProgress() in the function
sql_utils/repmgr_wrapper_funcs.c:last_xlog_replay_timestamp()
  • Loading branch information
postgres authored and postgres committed Sep 14, 2010
1 parent 7ec3485 commit d728ef0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()");
Expand Down
2 changes: 1 addition & 1 deletion sql_utils/repmgr_wrapper_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ last_xlog_replay_timestamp(PG_FUNCTION_ARGS)
TimestampTz rTime;
bool fromStream;

if (!InRecovery)
if (!RecoveryInProgress())
PG_RETURN_NULL();
else
{
Expand Down

0 comments on commit d728ef0

Please sign in to comment.