aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-12-03 18:59:09 +0900
committerMichael Paquier <michael@paquier.xyz>2019-12-03 18:59:09 +0900
commit68ab982906187fba3530a01b01eb065ea9134298 (patch)
treee094cf6eb0fc1f16ff3f746c24f4b9833757accb /src/backend/access/transam/xlog.c
parent88d45ac752ae49dbfafeb163b07381d3b8a6b601 (diff)
downloadpostgresql-68ab982906187fba3530a01b01eb065ea9134298.tar.gz
postgresql-68ab982906187fba3530a01b01eb065ea9134298.zip
Fix thinkos from commit 9989d37
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.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index ad084684205..6bc1a6b46d6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5528,7 +5528,7 @@ exitArchiveRecovery(TimeLineID endTLI, XLogRecPtr endOfLog)
char xlogfname[MAXFNAMELEN];
int save_errno = errno;
- XLogFileName(xlogfname, ThisTimeLineID, openLogSegNo,
+ XLogFileName(xlogfname, ThisTimeLineID, startLogSegNo,
wal_segment_size);
errno = save_errno;
ereport(ERROR,
@@ -10166,7 +10166,7 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
char xlogfname[MAXFNAMELEN];
int save_errno = errno;
- XLogFileName(xlogfname, ThisTimeLineID, openLogSegNo,
+ XLogFileName(xlogfname, ThisTimeLineID, segno,
wal_segment_size);
errno = save_errno;
ereport(PANIC,