diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 33af2f62914..0b6bd55eaff 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2972,7 +2972,7 @@ RemoveXlogFile(const char *segname, XLogRecPtr endptr) * Initialize info about where to try to recycle to. We allow recycling * segments up to XLOGfileslop segments beyond the current XLOG location. */ - XLByteToPrevSeg(endptr, endlogSegNo); + XLByteToSeg(endptr, endlogSegNo); max_advance = XLOGfileslop; snprintf(path, MAXPGPATH, XLOGDIR "/%s", segname);