From 19528de03e87db150703c948d1b8ec849b4e5db6 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Sat, 10 Jul 2021 18:30:47 +0300 Subject: [PATCH] Fix inaccurate comment on how often we checkpoint the repository. --- pageserver/src/walreceiver.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pageserver/src/walreceiver.rs b/pageserver/src/walreceiver.rs index e1c80932a1..420eecaeff 100644 --- a/pageserver/src/walreceiver.rs +++ b/pageserver/src/walreceiver.rs @@ -198,13 +198,14 @@ fn walreceiver_main( // flush ptr. timeline.advance_last_valid_lsn(endlsn); - // Somewhat arbitrarily, if we have at least 10 complete wal segments (16 MB each), + // Somewhat arbitrarily, if we have at least one complete wal segment (16 MB each), // "checkpoint" the repository to flush all the changes from WAL we've processed // so far to disk. After this, we don't need the original WAL anymore, and it - // can be removed. + // can be removed. This is probably too aggressive for production, but it's useful + // to expose bugs now. // // TODO: We don't actually dare to remove the WAL. It's useful for debugging, - // and we might it for logical decoiding other things in the future. Although + // and we might it for logical decoding other things in the future. Although // we should also be able to fetch it back from the WAL safekeepers or S3 if // needed. if prev_last_rec_lsn.segment_number(pg_constants::WAL_SEGMENT_SIZE)