@@ -538,8 +538,8 @@ do_backup_instance(void)
538
538
}
539
539
540
540
/*
541
- * It`s illegal to take PTRACK backup if LSN from ptrack_control() is not equal to
542
- * stort_backup LSN of previous backup
541
+ * It`s illegal to take PTRACK backup if LSN from ptrack_control() is not
542
+ * equal to stop_lsn of previous backup.
543
543
*/
544
544
if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK )
545
545
{
@@ -1193,7 +1193,8 @@ pg_ptrack_support(void)
1193
1193
1194
1194
/* Now we support only ptrack versions upper than 1.5 */
1195
1195
if (strcmp (PQgetvalue (res_db , 0 , 0 ), "1.5" ) != 0 &&
1196
- strcmp (PQgetvalue (res_db , 0 , 0 ), "1.6" ) != 0 )
1196
+ strcmp (PQgetvalue (res_db , 0 , 0 ), "1.6" ) != 0 &&
1197
+ strcmp (PQgetvalue (res_db , 0 , 0 ), "1.7" ) != 0 )
1197
1198
{
1198
1199
elog (WARNING , "Update your ptrack to the version 1.5 or upper. Current version is %s" , PQgetvalue (res_db , 0 , 0 ));
1199
1200
PQclear (res_db );
@@ -1283,7 +1284,9 @@ pg_ptrack_clear(void)
1283
1284
tblspcOid = atoi (PQgetvalue (res_db , i , 2 ));
1284
1285
1285
1286
tmp_conn = pgut_connect (dbname );
1286
- res = pgut_execute (tmp_conn , "SELECT pg_catalog.pg_ptrack_clear()" , 0 , NULL );
1287
+ res = pgut_execute (tmp_conn , "SELECT pg_catalog.pg_ptrack_clear()" ,
1288
+ 0 , NULL );
1289
+ PQclear (res );
1287
1290
1288
1291
sprintf (params [0 ], "%i" , dbOid );
1289
1292
sprintf (params [1 ], "%i" , tblspcOid );
@@ -1512,7 +1515,8 @@ wait_wal_lsn(XLogRecPtr lsn, bool is_start_lsn, bool wait_prev_segment)
1512
1515
if (wait_prev_segment )
1513
1516
elog (LOG , "Looking for segment: %s" , wal_segment );
1514
1517
else
1515
- elog (LOG , "Looking for LSN: %X/%X in segment: %s" , (uint32 ) (lsn >> 32 ), (uint32 ) lsn , wal_segment );
1518
+ elog (LOG , "Looking for LSN: %X/%X in segment: %s" ,
1519
+ (uint32 ) (lsn >> 32 ), (uint32 ) lsn , wal_segment );
1516
1520
1517
1521
#ifdef HAVE_LIBZ
1518
1522
snprintf (gz_wal_segment_path , sizeof (gz_wal_segment_path ), "%s.gz" ,
@@ -2648,7 +2652,8 @@ get_last_ptrack_lsn(void)
2648
2652
uint32 lsn_lo ;
2649
2653
XLogRecPtr lsn ;
2650
2654
2651
- res = pgut_execute (backup_conn , "select pg_catalog.pg_ptrack_control_lsn()" , 0 , NULL );
2655
+ res = pgut_execute (backup_conn , "select pg_catalog.pg_ptrack_control_lsn()" ,
2656
+ 0 , NULL );
2652
2657
2653
2658
/* Extract timeline and LSN from results of pg_start_backup() */
2654
2659
XLogDataFromLSN (PQgetvalue (res , 0 , 0 ), & lsn_hi , & lsn_lo );
0 commit comments