Skip to content

Commit 60731f3

Browse files
committed
Merge branch 'master' into stable
2 parents f0e4b42 + bf1c879 commit 60731f3

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

src/backup.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ do_backup_instance(void)
538538
}
539539

540540
/*
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.
543543
*/
544544
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
545545
{
@@ -1193,7 +1193,8 @@ pg_ptrack_support(void)
11931193

11941194
/* Now we support only ptrack versions upper than 1.5 */
11951195
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)
11971198
{
11981199
elog(WARNING, "Update your ptrack to the version 1.5 or upper. Current version is %s", PQgetvalue(res_db, 0, 0));
11991200
PQclear(res_db);
@@ -1283,7 +1284,9 @@ pg_ptrack_clear(void)
12831284
tblspcOid = atoi(PQgetvalue(res_db, i, 2));
12841285

12851286
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);
12871290

12881291
sprintf(params[0], "%i", dbOid);
12891292
sprintf(params[1], "%i", tblspcOid);
@@ -1512,7 +1515,8 @@ wait_wal_lsn(XLogRecPtr lsn, bool is_start_lsn, bool wait_prev_segment)
15121515
if (wait_prev_segment)
15131516
elog(LOG, "Looking for segment: %s", wal_segment);
15141517
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);
15161520

15171521
#ifdef HAVE_LIBZ
15181522
snprintf(gz_wal_segment_path, sizeof(gz_wal_segment_path), "%s.gz",
@@ -2648,7 +2652,8 @@ get_last_ptrack_lsn(void)
26482652
uint32 lsn_lo;
26492653
XLogRecPtr lsn;
26502654

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);
26522657

26532658
/* Extract timeline and LSN from results of pg_start_backup() */
26542659
XLogDataFromLSN(PQgetvalue(res, 0, 0), &lsn_hi, &lsn_lo);

tests/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def load_tests(loader, tests, pattern):
2121
# suite.addTests(loader.loadTestsFromModule(cfs_validate_backup))
2222
# suite.addTests(loader.loadTestsFromModule(logging))
2323
suite.addTests(loader.loadTestsFromModule(compression))
24-
suite.addTests(loader.loadTestsFromModule(compatibility))
2524
suite.addTests(loader.loadTestsFromModule(delete_test))
2625
suite.addTests(loader.loadTestsFromModule(delta))
2726
suite.addTests(loader.loadTestsFromModule(exclude))
@@ -62,8 +61,6 @@ def load_tests(loader, tests, pattern):
6261
# logging:
6362
# https://jira.postgrespro.ru/browse/PGPRO-584
6463
# https://jira.postgrespro.ru/secure/attachment/20420/20420_doc_logging.md
65-
# ptrack:
66-
# ptrack backup on replica should work correctly
6764
# archive:
6865
# immediate recovery and full recovery
6966
# backward compatibility:

tests/backup_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,3 +520,6 @@ def test_tablespace_in_pgdata_pgpro_1376(self):
520520
if self.paranoia:
521521
pgdata_restored = self.pgdata_content(node.data_dir)
522522
self.compare_pgdata(pgdata, pgdata_restored)
523+
524+
# Clean after yourself
525+
self.del_test_dir(module_name, fname)

0 commit comments

Comments
 (0)