Skip to content

Commit 48a8723

Browse files
committed
tests: test_multithread_page_backup_with_toast added
1 parent 7362782 commit 48a8723

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

tests/page.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,3 +973,38 @@ def test_page_backup_with_alien_wal_segment(self):
973973

974974
# Clean after yourself
975975
self.del_test_dir(module_name, fname)
976+
977+
# @unittest.skip("skip")
978+
def test_multithread_page_backup_with_toast(self):
979+
"""
980+
make node, create toast, do multithread PAGE backup
981+
"""
982+
fname = self.id().split('.')[3]
983+
node = self.make_simple_node(
984+
base_dir="{0}/{1}/node".format(module_name, fname),
985+
initdb_params=['--data-checksums'],
986+
pg_options={'wal_level': 'replica'}
987+
)
988+
989+
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
990+
self.init_pb(backup_dir)
991+
self.add_instance(backup_dir, 'node', node)
992+
self.set_archiving(backup_dir, 'node', node)
993+
node.start()
994+
995+
self.backup_node(backup_dir, 'node', node)
996+
997+
# make some wals
998+
node.safe_psql(
999+
"postgres",
1000+
"create table t3 as select i, "
1001+
"repeat(md5(i::text),5006056) as fat_attr "
1002+
"from generate_series(0,70) i")
1003+
1004+
# Multi-thread PAGE backup
1005+
self.backup_node(
1006+
backup_dir, 'node', node,
1007+
backup_type='page', options=["-j", "4"])
1008+
1009+
# Clean after yourself
1010+
self.del_test_dir(module_name, fname)

0 commit comments

Comments
 (0)