diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index efd0347bc9..efda4634d5 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2805,6 +2805,11 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, errmsg("could not rename file \"%s\" to \"%s\": %m", path, xlogfpath))); + /* + * Set path to point at the new file in pg_xlog. + */ + strncpy(path, xlogfpath, MAXPGPATH); + /* * If the existing segment was replaced, since walsenders might have * it open, request them to reload a currently-open segment.