File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -590,16 +590,16 @@ impl Database {
590590 AutoVacuumMode :: None
591591 } ;
592592
593- // Force autovacuum to None if the experimental flag is not enabled
594- let final_mode = if !self . opts . enable_autovacuum {
595- if mode != AutoVacuumMode :: None {
596- tracing:: warn!(
597- "Database has autovacuum enabled but --experimental-autovacuum flag is not set. Forcing autovacuum to None."
598- ) ;
599- }
600- AutoVacuumMode :: None
601- } else {
593+ // TODO: remove behind experimental toggle once feature is fully supported.
594+ // Do not disable autovacuum if the database header already has it enabled; otherwise we would
595+ // corrupt pointer-map expectations for existing databases. The flag only controls enabling it
596+ // when creating/rewriting databases, not honoring an already-enabled file.
597+ let final_mode = if mode != AutoVacuumMode :: None {
602598 mode
599+ } else if self . opts . enable_autovacuum {
600+ mode
601+ } else {
602+ AutoVacuumMode :: None
603603 } ;
604604
605605 pager. set_auto_vacuum_mode ( final_mode) ;
You can’t perform that action at this time.
0 commit comments