1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-23 11:45:36 +02:00

Fix test test_basic_ptrack_truncate_replica. Pause replication before taking backup to make datadir comparison more stable.

This commit is contained in:
anastasia 2020-11-20 13:42:55 +03:00
parent 10bd31097f
commit bd29752456

View File

@ -3108,6 +3108,15 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
# Sync master and replica
self.wait_until_replica_catch_with_master(master, replica)
if replica.major_version < 10:
replica.safe_psql(
"postgres",
"select pg_xlog_replay_pause()")
else:
replica.safe_psql(
"postgres",
"select pg_wal_replay_pause()")
self.backup_node(
backup_dir, 'replica', replica, backup_type='ptrack',
options=[