@@ -887,8 +887,8 @@ static bool WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
887
887
static int emode_for_corrupt_record (int emode ,XLogRecPtr RecPtr );
888
888
static void XLogFileClose (void );
889
889
static void PreallocXlogFiles (XLogRecPtr endptr );
890
- static void RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr );
891
- static void RemoveXlogFile (const char * segname ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr );
890
+ static void RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr lastredoptr ,XLogRecPtr endptr );
891
+ static void RemoveXlogFile (const char * segname ,XLogRecPtr lastredoptr ,XLogRecPtr endptr );
892
892
static void UpdateLastRemovedPtr (char * filename );
893
893
static void ValidateXLOGDirectoryStructure (void );
894
894
static void CleanupBackupHistory (void );
@@ -2293,7 +2293,7 @@ assign_checkpoint_completion_target(double newval, void *extra)
2293
2293
* XLOG segments? Returns the highest segment that should be preallocated.
2294
2294
*/
2295
2295
static XLogSegNo
2296
- XLOGfileslop (XLogRecPtr RedoRecPtr )
2296
+ XLOGfileslop (XLogRecPtr lastredoptr )
2297
2297
{
2298
2298
XLogSegNo minSegNo ;
2299
2299
XLogSegNo maxSegNo ;
@@ -2305,9 +2305,9 @@ XLOGfileslop(XLogRecPtr RedoRecPtr)
2305
2305
* correspond to. Always recycle enough segments to meet the minimum, and
2306
2306
* remove enough segments to stay below the maximum.
2307
2307
*/
2308
- minSegNo = RedoRecPtr /wal_segment_size +
2308
+ minSegNo = lastredoptr /wal_segment_size +
2309
2309
ConvertToXSegs (min_wal_size_mb ,wal_segment_size )- 1 ;
2310
- maxSegNo = RedoRecPtr /wal_segment_size +
2310
+ maxSegNo = lastredoptr /wal_segment_size +
2311
2311
ConvertToXSegs (max_wal_size_mb ,wal_segment_size )- 1 ;
2312
2312
2313
2313
/*
@@ -2322,7 +2322,7 @@ XLOGfileslop(XLogRecPtr RedoRecPtr)
2322
2322
/* add 10% for good measure. */
2323
2323
distance *=1.10 ;
2324
2324
2325
- recycleSegNo = (XLogSegNo )ceil (((double )RedoRecPtr + distance ) /
2325
+ recycleSegNo = (XLogSegNo )ceil (((double )lastredoptr + distance ) /
2326
2326
wal_segment_size );
2327
2327
2328
2328
if (recycleSegNo < minSegNo )
@@ -3887,12 +3887,12 @@ UpdateLastRemovedPtr(char *filename)
3887
3887
/*
3888
3888
* Recycle or remove all log files older or equal to passed segno.
3889
3889
*
3890
- * endptr is current (or recent) end of xlog, andRedoRecPtr is the
3890
+ * endptr is current (or recent) end of xlog, andlastredoptr is the
3891
3891
* redo pointer of the last checkpoint. These are used to determine
3892
3892
* whether we want to recycle rather than delete no-longer-wanted log files.
3893
3893
*/
3894
3894
static void
3895
- RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr )
3895
+ RemoveOldXlogFiles (XLogSegNo segno ,XLogRecPtr lastredoptr ,XLogRecPtr endptr )
3896
3896
{
3897
3897
DIR * xldir ;
3898
3898
struct dirent * xlde ;
@@ -3935,7 +3935,7 @@ RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr RedoRecPtr, XLogRecPtr endptr)
3935
3935
/* Update the last removed location in shared memory first */
3936
3936
UpdateLastRemovedPtr (xlde -> d_name );
3937
3937
3938
- RemoveXlogFile (xlde -> d_name ,RedoRecPtr ,endptr );
3938
+ RemoveXlogFile (xlde -> d_name ,lastredoptr ,endptr );
3939
3939
}
3940
3940
}
3941
3941
}
@@ -4009,14 +4009,14 @@ RemoveNonParentXlogFiles(XLogRecPtr switchpoint, TimeLineID newTLI)
4009
4009
/*
4010
4010
* Recycle or remove a log file that's no longer needed.
4011
4011
*
4012
- * endptr is current (or recent) end of xlog, andRedoRecPtr is the
4012
+ * endptr is current (or recent) end of xlog, andlastredoptr is the
4013
4013
* redo pointer of the last checkpoint. These are used to determine
4014
4014
* whether we want to recycle rather than delete no-longer-wanted log files.
4015
- * IfRedoRecPtr is not known, pass invalid, and the function will recycle,
4015
+ * Iflastredoptr is not known, pass invalid, and the function will recycle,
4016
4016
* somewhat arbitrarily, 10 future segments.
4017
4017
*/
4018
4018
static void
4019
- RemoveXlogFile (const char * segname ,XLogRecPtr RedoRecPtr ,XLogRecPtr endptr )
4019
+ RemoveXlogFile (const char * segname ,XLogRecPtr lastredoptr ,XLogRecPtr endptr )
4020
4020
{
4021
4021
char path [MAXPGPATH ];
4022
4022
#ifdef WIN32
@@ -4030,10 +4030,10 @@ RemoveXlogFile(const char *segname, XLogRecPtr RedoRecPtr, XLogRecPtr endptr)
4030
4030
* Initialize info about where to try to recycle to.
4031
4031
*/
4032
4032
XLByteToSeg (endptr ,endlogSegNo ,wal_segment_size );
4033
- if (RedoRecPtr == InvalidXLogRecPtr )
4033
+ if (lastredoptr == InvalidXLogRecPtr )
4034
4034
recycleSegNo = endlogSegNo + 10 ;
4035
4035
else
4036
- recycleSegNo = XLOGfileslop (RedoRecPtr );
4036
+ recycleSegNo = XLOGfileslop (lastredoptr );
4037
4037
4038
4038
snprintf (path ,MAXPGPATH ,XLOGDIR "/%s" ,segname );
4039
4039