Skip to content

Commit 02840b8

Browse files
committed
minor changes
1 parent b1975e3 commit 02840b8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/delete.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ delete_walfiles_internal(XLogRecPtr keep_lsn, timelineInfo *tlinfo,
753753

754754
if (XLogRecPtrIsInvalid(keep_lsn))
755755
{
756-
/* Drop all segments in timeline */
756+
/* Drop all files in timeline */
757757
elog(INFO, "All files on timeline %i will be removed", tlinfo->tli);
758758
StartSegNo = tlinfo->begin_segno;
759759
EndSegNo = tlinfo->end_segno;
@@ -769,9 +769,11 @@ delete_walfiles_internal(XLogRecPtr keep_lsn, timelineInfo *tlinfo,
769769
if (EndSegNo > 0 && EndSegNo > StartSegNo)
770770
elog(INFO, "WAL segments between %08X%08X and %08X%08X on timeline %i will be removed",
771771
(uint32) StartSegNo / xlog_seg_size, (uint32) StartSegNo % xlog_seg_size,
772-
(uint32) EndSegNo / xlog_seg_size, (uint32) EndSegNo % xlog_seg_size,
772+
(uint32) (EndSegNo - 1) / xlog_seg_size,
773+
(uint32) (EndSegNo - 1) % xlog_seg_size,
773774
tlinfo->tli);
774775

776+
/* sanity */
775777
if (EndSegNo > StartSegNo)
776778
/* typical scenario */
777779
wal_size_logical = (EndSegNo-StartSegNo) * xlog_seg_size;
@@ -787,7 +789,7 @@ delete_walfiles_internal(XLogRecPtr keep_lsn, timelineInfo *tlinfo,
787789
*/
788790
if (StartSegNo > 0 && EndSegNo > 0)
789791
elog(WARNING, "On timeline %i first segment %08X%08X is greater than "
790-
"oldest segment to keep %08X%08X. Possible WAL archive corruption.",
792+
"oldest segment to keep %08X%08X. Possible WAL archive corruption!",
791793
tlinfo->tli,
792794
(uint32) StartSegNo / xlog_seg_size, (uint32) StartSegNo % xlog_seg_size,
793795
(uint32) EndSegNo / xlog_seg_size, (uint32) EndSegNo % xlog_seg_size);

0 commit comments

Comments
 (0)