Skip to content

Commit f601238

Browse files
committed
[PGPRO-5421] modify test_wal_file_path_3 test to prevent pushing wal files from pgdata
1 parent 17bd528 commit f601238

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/archive.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *wa
119119
{
120120
uint64 i;
121121
char current_dir[MAXPGPATH];
122+
/* directory with wal files to be archived (usually instance pgdata/pg_wal) */
122123
char pg_xlog_dir[MAXPGPATH];
123-
char xlog_wal_path[MAXPGPATH];
124+
/* usually instance pgdata/pg_wal/archive_status */
124125
char archive_status_dir[MAXPGPATH];
126+
char xlog_wal_path[MAXPGPATH];
125127
uint64 system_id;
126128
bool is_compress = false;
127129

tests/archive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,6 @@ def test_wal_file_path(self):
18371837
"""
18381838
fname = self.id().split('.')[3]
18391839
backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup')
1840-
self.set_archiving
18411840
node = self.make_simple_node(
18421841
base_dir=os.path.join(module_name, fname, 'node'),
18431842
set_replication=True,
@@ -1920,7 +1919,8 @@ def test_wal_file_path_3(self):
19201919
set_replication=True,
19211920
initdb_params=['--data-checksums'],
19221921
pg_options={
1923-
'archive_mode': 'on'})
1922+
'archive_mode': 'on',
1923+
'wal_keep_size' : '0'})
19241924

19251925
self.init_pb(backup_dir)
19261926
self.add_instance(backup_dir, 'node', node)

0 commit comments

Comments
 (0)