*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 2804,2809 **** XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli,
--- 2804,2810 ----
  					(errcode_for_file_access(),
  					 errmsg("could not rename file \"%s\" to \"%s\": %m",
  							path, xlogfpath)));
+ 		strncpy(xlogfpath, path, MAXPGPATH);
  
  		/*
  		 * If the existing segment was replaced, since walsenders might have
