From 172314155e4bedd17904cf9eb3b49598fc3abfd1 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 26 Jul 2022 00:59:14 +0300 Subject: [PATCH] Compact only once on psql checkpoint call --- pageserver/src/page_service.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pageserver/src/page_service.rs b/pageserver/src/page_service.rs index 078edc5c9f..3dba207ab9 100644 --- a/pageserver/src/page_service.rs +++ b/pageserver/src/page_service.rs @@ -1159,14 +1159,9 @@ impl postgres_backend::Handler for PageServerHandler { let timeline = tenant_mgr::get_local_timeline_with_load(tenantid, timelineid) .context("Cannot load local timeline")?; + // Checkpoint the timeline and also compact it (due to `CheckpointConfig::Forced`). timeline.tline.checkpoint(CheckpointConfig::Forced)?; - // Also compact it. - // - // FIXME: This probably shouldn't be part of a "checkpoint" command, but a - // separate operation. Update the tests if you change this. - timeline.tline.compact()?; - pgb.write_message_noflush(&SINGLE_COL_ROWDESC)? .write_message_noflush(&BeMessage::CommandComplete(b"SELECT 1"))?; } else if query_string.starts_with("get_lsn_by_timestamp ") {