@@ -893,8 +893,8 @@ static intemode_for_corrupt_record(int emode, XLogRecPtr RecPtr);
893893static void XLogFileClose (void );
894894static void PreallocXlogFiles (XLogRecPtr endptr );
895895static void RemoveTempXlogFiles (void );
896- static void RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr );
897- static void RemoveXlogFile (const char * segname ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr );
896+ static void RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr lastredoptr ,XLogRecPtr endptr );
897+ static void RemoveXlogFile (const char * segname ,XLogRecPtr lastredoptr ,XLogRecPtr endptr );
898898static void UpdateLastRemovedPtr (char * filename );
899899static void ValidateXLOGDirectoryStructure (void );
900900static void CleanupBackupHistory (void );
@@ -2299,7 +2299,7 @@ assign_checkpoint_completion_target(double newval, void *extra)
22992299 * XLOG segments? Returns the highest segment that should be preallocated.
23002300 */
23012301static XLogSegNo
2302- XLOGfileslop (XLogRecPtr RedoRecPtr )
2302+ XLOGfileslop (XLogRecPtr lastredoptr )
23032303{
23042304XLogSegNo minSegNo ;
23052305XLogSegNo maxSegNo ;
@@ -2311,9 +2311,9 @@ XLOGfileslop(XLogRecPtr RedoRecPtr)
23112311 * correspond to. Always recycle enough segments to meet the minimum, and
23122312 * remove enough segments to stay below the maximum.
23132313 */
2314- minSegNo = RedoRecPtr /wal_segment_size +
2314+ minSegNo = lastredoptr /wal_segment_size +
23152315ConvertToXSegs (min_wal_size_mb ,wal_segment_size )- 1 ;
2316- maxSegNo = RedoRecPtr /wal_segment_size +
2316+ maxSegNo = lastredoptr /wal_segment_size +
23172317ConvertToXSegs (max_wal_size_mb ,wal_segment_size )- 1 ;
23182318
23192319/*
@@ -2328,7 +2328,7 @@ XLOGfileslop(XLogRecPtr RedoRecPtr)
23282328/* add 10% for good measure. */
23292329distance *=1.10 ;
23302330
2331- recycleSegNo = (XLogSegNo )ceil (((double )RedoRecPtr + distance ) /
2331+ recycleSegNo = (XLogSegNo )ceil (((double )lastredoptr + distance ) /
23322332wal_segment_size );
23332333
23342334if (recycleSegNo < minSegNo )
@@ -3935,12 +3935,12 @@ RemoveTempXlogFiles(void)
39353935/*
39363936 * Recycle or remove all log files older or equal to passed segno.
39373937 *
3938- * endptr is current (or recent) end of xlog, andRedoRecPtr is the
3938+ * endptr is current (or recent) end of xlog, andlastredoptr is the
39393939 * redo pointer of the last checkpoint. These are used to determine
39403940 * whether we want to recycle rather than delete no-longer-wanted log files.
39413941 */
39423942static void
3943- RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr )
3943+ RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr lastredoptr ,XLogRecPtr endptr )
39443944{
39453945DIR * xldir ;
39463946struct dirent * xlde ;
@@ -3983,7 +3983,7 @@ RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr RedoRecPtr, XLogRecPtr endptr)
39833983/* Update the last removed location in shared memory first */
39843984UpdateLastRemovedPtr (xlde -> d_name );
39853985
3986- RemoveXlogFile (xlde -> d_name ,RedoRecPtr ,endptr );
3986+ RemoveXlogFile (xlde -> d_name ,lastredoptr ,endptr );
39873987}
39883988}
39893989}
@@ -4057,14 +4057,14 @@ RemoveNonParentXlogFiles(XLogRecPtr switchpoint, TimeLineID newTLI)
40574057/*
40584058 * Recycle or remove a log file that's no longer needed.
40594059 *
4060- * endptr is current (or recent) end of xlog, andRedoRecPtr is the
4060+ * endptr is current (or recent) end of xlog, andlastredoptr is the
40614061 * redo pointer of the last checkpoint. These are used to determine
40624062 * whether we want to recycle rather than delete no-longer-wanted log files.
4063- * IfRedoRecPtr is not known, pass invalid, and the function will recycle,
4063+ * Iflastredoptr is not known, pass invalid, and the function will recycle,
40644064 * somewhat arbitrarily, 10 future segments.
40654065 */
40664066static void
4067- RemoveXlogFile (const char * segname ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr )
4067+ RemoveXlogFile (const char * segname ,XLogRecPtr lastredoptr ,XLogRecPtr endptr )
40684068{
40694069char path [MAXPGPATH ];
40704070#ifdef WIN32
@@ -4080,10 +4080,10 @@ RemoveXlogFile(const char *segname, XLogRecPtr RedoRecPtr, XLogRecPtr endptr)
40804080 * Initialize info about where to try to recycle to.
40814081 */
40824082XLByteToSeg (endptr ,endlogSegNo ,wal_segment_size );
4083- if (RedoRecPtr == InvalidXLogRecPtr )
4083+ if (lastredoptr == InvalidXLogRecPtr )
40844084recycleSegNo = endlogSegNo + 10 ;
40854085else
4086- recycleSegNo = XLOGfileslop (RedoRecPtr );
4086+ recycleSegNo = XLOGfileslop (lastredoptr );
40874087}
40884088else
40894089recycleSegNo = 0 ;/* keep compiler quiet */