Skip to content

Commit bd29752

Browse files
committed
Fix test test_basic_ptrack_truncate_replica. Pause replication before taking backup to make datadir comparison more stable.
1 parent 10bd310 commit bd29752

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/ptrack.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,6 +3108,15 @@ def test_basic_ptrack_truncate_replica(self):
31083108
# Sync master and replica
31093109
self.wait_until_replica_catch_with_master(master, replica)
31103110

3111+
if replica.major_version < 10:
3112+
replica.safe_psql(
3113+
"postgres",
3114+
"select pg_xlog_replay_pause()")
3115+
else:
3116+
replica.safe_psql(
3117+
"postgres",
3118+
"select pg_wal_replay_pause()")
3119+
31113120
self.backup_node(
31123121
backup_dir, 'replica', replica, backup_type='ptrack',
31133122
options=[

0 commit comments

Comments
 (0)