Skip to content

Commit 69db990

Browse files
committed
use correct args for wait_wal_lsn()
1 parent 3d2bcda commit 69db990

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/backup.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
8787
{
8888
int i;
8989
char external_prefix[MAXPGPATH]; /* Temp value. Used as template */
90-
char dst_backup_path[MAXPGPATH];
9190
char label[1024];
9291
XLogRecPtr prev_backup_start_lsn = InvalidXLogRecPtr;
9392

@@ -270,17 +269,19 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
270269
/* start stream replication */
271270
if (stream_wal)
272271
{
273-
join_path_components(dst_backup_path, current.database_dir, PG_XLOG_DIR);
274-
fio_mkdir(dst_backup_path, DIR_PERMISSION, FIO_BACKUP_HOST);
272+
char stream_xlog_path[MAXPGPATH];
275273

276-
start_WAL_streaming(backup_conn, dst_backup_path, &instance_config.conn_opt,
274+
join_path_components(stream_xlog_path, current.database_dir, PG_XLOG_DIR);
275+
fio_mkdir(stream_xlog_path, DIR_PERMISSION, FIO_BACKUP_HOST);
276+
277+
start_WAL_streaming(backup_conn, stream_xlog_path, &instance_config.conn_opt,
277278
current.start_lsn, current.tli);
278279

279280
/* Make sure that WAL streaming is working
280281
* PAGE backup in stream mode is waited twice, first for
281282
* segment in WAL archive and then for streamed segment
282283
*/
283-
wait_wal_lsn(current.start_lsn, true, current.tli, false, true, ERROR, true, &current);
284+
wait_wal_lsn(current.start_lsn, true, current.tli, false, true, ERROR, true, stream_xlog_path);
284285
}
285286

286287
/* initialize backup's file list */

0 commit comments

Comments
 (0)