diff --git a/src/backup.c b/src/backup.c index 1d58d9f2..fc863070 100644 --- a/src/backup.c +++ b/src/backup.c @@ -538,8 +538,8 @@ do_backup_instance(void) } /* - * It`s illegal to take PTRACK backup if LSN from ptrack_control() is not equal to - * stort_backup LSN of previous backup + * It`s illegal to take PTRACK backup if LSN from ptrack_control() is not + * equal to stop_lsn of previous backup. */ if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK) { @@ -1283,7 +1283,9 @@ pg_ptrack_clear(void) tblspcOid = atoi(PQgetvalue(res_db, i, 2)); tmp_conn = pgut_connect(dbname); - res = pgut_execute(tmp_conn, "SELECT pg_catalog.pg_ptrack_clear()", 0, NULL); + res = pgut_execute(tmp_conn, "SELECT pg_catalog.pg_ptrack_clear()", + 0, NULL); + PQclear(res); sprintf(params[0], "%i", dbOid); sprintf(params[1], "%i", tblspcOid); @@ -1512,7 +1514,8 @@ wait_wal_lsn(XLogRecPtr lsn, bool is_start_lsn, bool wait_prev_segment) if (wait_prev_segment) elog(LOG, "Looking for segment: %s", wal_segment); else - elog(LOG, "Looking for LSN: %X/%X in segment: %s", (uint32) (lsn >> 32), (uint32) lsn, wal_segment); + elog(LOG, "Looking for LSN: %X/%X in segment: %s", + (uint32) (lsn >> 32), (uint32) lsn, wal_segment); #ifdef HAVE_LIBZ snprintf(gz_wal_segment_path, sizeof(gz_wal_segment_path), "%s.gz", @@ -2648,7 +2651,8 @@ get_last_ptrack_lsn(void) uint32 lsn_lo; XLogRecPtr lsn; - res = pgut_execute(backup_conn, "select pg_catalog.pg_ptrack_control_lsn()", 0, NULL); + res = pgut_execute(backup_conn, "select pg_catalog.pg_ptrack_control_lsn()", + 0, NULL); /* Extract timeline and LSN from results of pg_start_backup() */ XLogDataFromLSN(PQgetvalue(res, 0, 0), &lsn_hi, &lsn_lo);