Commit 68ab9829 authored by Michael Paquier's avatar Michael Paquier

Fix thinkos from commit 9989d37d

Error messages referring to incorrect WAL segment names could have been
generated for a fsync() failure or when creating a new segment at the
end of recovery.
parent 88d45ac7
...@@ -5528,7 +5528,7 @@ exitArchiveRecovery(TimeLineID endTLI, XLogRecPtr endOfLog) ...@@ -5528,7 +5528,7 @@ exitArchiveRecovery(TimeLineID endTLI, XLogRecPtr endOfLog)
char xlogfname[MAXFNAMELEN]; char xlogfname[MAXFNAMELEN];
int save_errno = errno; int save_errno = errno;
XLogFileName(xlogfname, ThisTimeLineID, openLogSegNo, XLogFileName(xlogfname, ThisTimeLineID, startLogSegNo,
wal_segment_size); wal_segment_size);
errno = save_errno; errno = save_errno;
ereport(ERROR, ereport(ERROR,
...@@ -10166,7 +10166,7 @@ issue_xlog_fsync(int fd, XLogSegNo segno) ...@@ -10166,7 +10166,7 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
char xlogfname[MAXFNAMELEN]; char xlogfname[MAXFNAMELEN];
int save_errno = errno; int save_errno = errno;
XLogFileName(xlogfname, ThisTimeLineID, openLogSegNo, XLogFileName(xlogfname, ThisTimeLineID, segno,
wal_segment_size); wal_segment_size);
errno = save_errno; errno = save_errno;
ereport(PANIC, ereport(PANIC,
......
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