File tree 1 file changed +4
-4
lines changed
src/backend/access/transam
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7523,9 +7523,9 @@ CreateRestartPoint(int flags)
7523
7523
}
7524
7524
7525
7525
/*
7526
- * Calculate the last segment that we need to retain because of
7527
- * wal_keep_segments, by subtracting wal_keep_segments from
7528
- * the given xlog location, recptr.
7526
+ * Retreat *logSegNo to the last segment that we need to retain because of
7527
+ * wal_keep_segments. This is calculated by subtracting wal_keep_segments
7528
+ * from the given xlog location, recptr.
7529
7529
*/
7530
7530
static void
7531
7531
KeepLogSeg (XLogRecPtr recptr , XLogSegNo * logSegNo )
@@ -7541,7 +7541,7 @@ KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo)
7541
7541
if (segno <= wal_keep_segments )
7542
7542
segno = 1 ;
7543
7543
else
7544
- segno = * logSegNo - wal_keep_segments ;
7544
+ segno = segno - wal_keep_segments ;
7545
7545
7546
7546
/* don't delete WAL segments newer than the calculated segment */
7547
7547
if (segno < * logSegNo )
You can’t perform that action at this time.
0 commit comments