Skip to content

Commit 687677f

Browse files
committed
Merge branch 'pgpro_2370'
2 parents c052651 + d7f51ac commit 687677f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/dir.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,14 @@ dir_check_file(const char *root, pgFile *file)
630630
}
631631
else
632632
{
633+
/*
634+
* snapfs files:
635+
* RELFILENODE.BLOCKNO.snapmap.SNAPID
636+
* RELFILENODE.BLOCKNO.snap.SNAPID
637+
*/
638+
if (strstr(file->name, "snap") != NULL)
639+
return true;
640+
633641
len = strlen(file->name);
634642
/* reloid.cfm */
635643
if (len > 3 && strcmp(file->name + len - 3, "cfm") == 0)

tests/snapfs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class SnapFSTest(ProbackupTest, unittest.TestCase):
1111

1212
# @unittest.skip("skip")
1313
# @unittest.expectedFailure
14-
def test_backup_modes_archive(self):
14+
def test_snapfs_simple(self):
1515
"""standart backup modes with ARCHIVE WAL method"""
1616
fname = self.id().split('.')[3]
1717
node = self.make_simple_node(
@@ -32,7 +32,7 @@ def test_backup_modes_archive(self):
3232
'postgres',
3333
'select pg_make_snapshot()')
3434

35-
node.pgbench_init(scale=100)
35+
node.pgbench_init(scale=10)
3636

3737
pgbench = node.pgbench(options=['-T', '50', '-c', '2', '--no-vacuum'])
3838
pgbench.wait()
@@ -42,18 +42,18 @@ def test_backup_modes_archive(self):
4242

4343
node.safe_psql(
4444
'postgres',
45-
'select pg_remove_snashot(1)')
45+
'select pg_remove_snapshot(1)')
4646

4747
self.backup_node(
48-
backup_dir, 'node', node)
48+
backup_dir, 'node', node, backup_type='page')
4949

5050
pgdata = self.pgdata_content(node.data_dir)
5151

5252
node.cleanup()
5353

5454
self.restore_node(
5555
backup_dir, 'node',
56-
restored_node, options=["-j", "4"])
56+
node, options=["-j", "4"])
5757

5858
pgdata_restored = self.pgdata_content(node.data_dir)
5959
self.compare_pgdata(pgdata, pgdata_restored)

0 commit comments

Comments
 (0)