@@ -60,6 +60,7 @@ def test_ptrack_truncate(self):
60
60
# Make full backup to clean every ptrack
61
61
self .backup_node (
62
62
backup_dir , 'node' , node , options = ['-j10' , '--stream' ])
63
+
63
64
for i in idx_ptrack :
64
65
idx_ptrack [i ]['ptrack' ] = self .get_ptrack_bits_per_page_for_fork (
65
66
node , idx_ptrack [i ]['path' ], [idx_ptrack [i ]['old_size' ]])
@@ -100,6 +101,7 @@ def test_ptrack_truncate_replica(self):
100
101
replica .start ()
101
102
102
103
# Create table and indexes
104
+ self .create_tblspace_in_node (master , 'somedata' )
103
105
master .safe_psql (
104
106
"postgres" ,
105
107
"create sequence t_seq; create table t_heap tablespace somedata "
@@ -114,9 +116,6 @@ def test_ptrack_truncate_replica(self):
114
116
i , idx_ptrack [i ]['relation' ],
115
117
idx_ptrack [i ]['type' ], idx_ptrack [i ]['column' ]))
116
118
117
- replica .safe_psql ('postgres' , 'truncate t_heap' )
118
- replica .safe_psql ('postgres' , 'checkpoint' )
119
-
120
119
# Sync master and replica
121
120
lsn = master .safe_psql (
122
121
'postgres' , 'SELECT pg_catalog.pg_current_wal_lsn()' ).rstrip ()
@@ -143,9 +142,7 @@ def test_ptrack_truncate_replica(self):
143
142
replica , idx_ptrack [i ]['path' ], [idx_ptrack [i ]['old_size' ]])
144
143
self .check_ptrack_clean (idx_ptrack [i ], idx_ptrack [i ]['old_size' ])
145
144
146
- # Delete some rows, vacuum it and make checkpoint
147
- master .safe_psql ('postgres' , 'delete from t_heap where id%2 = 1' )
148
- master .safe_psql ('postgres' , 'vacuum t_heap' )
145
+ master .safe_psql ('postgres' , 'truncate t_heap' )
149
146
master .safe_psql ('postgres' , 'checkpoint' )
150
147
151
148
# Sync master and replica
0 commit comments