diff --git a/bottomless/src/replicator.rs b/bottomless/src/replicator.rs index 648ecc91..92623dfc 100644 --- a/bottomless/src/replicator.rs +++ b/bottomless/src/replicator.rs @@ -363,7 +363,7 @@ impl Replicator { } else { tokio::fs::remove_file(&fpath).await.unwrap(); let elapsed = Instant::now() - start; - tracing::trace!("Uploaded to S3: {} in {:?}", fpath, elapsed); + tracing::debug!("Uploaded to S3: {} in {:?}", fpath, elapsed); } drop(permit); }); diff --git a/sqld/src/lib.rs b/sqld/src/lib.rs index 45ced204..3231badc 100644 --- a/sqld/src/lib.rs +++ b/sqld/src/lib.rs @@ -443,7 +443,8 @@ async fn start_primary( ) -> anyhow::Result<()> { let is_fresh_db = check_fresh_db(&config.db_path); // switch frame-count checkpoint to time-based one - let disable_auto_checkpoint = config.checkpoint_interval.is_some(); + let disable_auto_checkpoint = + config.checkpoint_interval.is_some() && config.bottomless_replication.is_some(); let logger = Arc::new(ReplicationLogger::open( &config.db_path, config.max_log_size, @@ -767,7 +768,9 @@ pub async fn run_server(config: Config) -> anyhow::Result<()> { } if let Some(interval) = config.checkpoint_interval { - join_set.spawn(run_checkpoint_cron(config.db_path.clone(), interval)); + if config.bottomless_replication.is_some() { + join_set.spawn(run_checkpoint_cron(config.db_path.clone(), interval)); + } } let reset = HARD_RESET.clone(); diff --git a/sqld/src/main.rs b/sqld/src/main.rs index 0bc5ef20..4f21e446 100644 --- a/sqld/src/main.rs +++ b/sqld/src/main.rs @@ -189,7 +189,7 @@ struct Cli { http_replication_listen_addr: Option, /// Interval in seconds, in which WAL checkpoint is being called. /// By default, the interval is 1 hour. - #[clap(long, env = "SQLD_CHECKPOINT_INTERVAL_S", default_value = "3600")] + #[clap(long, env = "SQLD_CHECKPOINT_INTERVAL_S")] checkpoint_interval_s: Option, } diff --git a/sqld/src/replication/primary/logger.rs b/sqld/src/replication/primary/logger.rs index 161fb455..64eedcba 100644 --- a/sqld/src/replication/primary/logger.rs +++ b/sqld/src/replication/primary/logger.rs @@ -922,7 +922,6 @@ fn checkpoint_db(data_path: &Path, disable_auto_checkpoint: bool) -> anyhow::Res if num_checkpointed == -1 { bail!("Checkpoint failed: database journal_mode is not WAL") } else { - conn.execute("VACUUM", ())?; Ok(()) } } else {