Commit 87d84d67 authored by Magnus Hagander's avatar Magnus Hagander

Fix start WAL filename for concurrent backups from standby

On a standby, ThisTimelineID is always 0, so we would generate a
filename in timeline 0 even for other timelines. Instead, use starttli
which we have retreived from the controlfile.

Report by: Francesco Canovai in bug #14230
Author: Marco Nenciarini
Reviewed by: Michael Paquier and Amit Kapila
parent 96112ee7
...@@ -9974,7 +9974,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, ...@@ -9974,7 +9974,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
} while (!gotUniqueStartpoint); } while (!gotUniqueStartpoint);
XLByteToSeg(startpoint, _logSegNo); XLByteToSeg(startpoint, _logSegNo);
XLogFileName(xlogfilename, ThisTimeLineID, _logSegNo); XLogFileName(xlogfilename, starttli, _logSegNo);
/* /*
* Construct tablespace_map file * Construct tablespace_map file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment