Fossil SCM

The "fossil repack" command should run VACUUM if either new compression opportunities were found *or* if the freelist count is positive.

drh 2023-07-10 12:59 trunk
Commit 4d9ede80bec62b687ec8c93a66911e1d808540d93a3d84d111808e7b34e50b44
1 file changed +1
--- src/rebuild.c
+++ src/rebuild.c
@@ -632,10 +632,11 @@
632632
fossil_print("%d new deltas save %,lld bytes\n", nDelta, nByte);
633633
}
634634
runVacuum = 1;
635635
}else{
636636
fossil_print("no new compression opportunities found\n");
637
+ runVacuum = db_int(0, "PRAGMA repository.freelist_count")>0;
637638
}
638639
if( runVacuum ){
639640
fossil_print("Vacuuming the database... "); fflush(stdout);
640641
db_multi_exec("VACUUM");
641642
fossil_print("done\n");
642643
--- src/rebuild.c
+++ src/rebuild.c
@@ -632,10 +632,11 @@
632 fossil_print("%d new deltas save %,lld bytes\n", nDelta, nByte);
633 }
634 runVacuum = 1;
635 }else{
636 fossil_print("no new compression opportunities found\n");
 
637 }
638 if( runVacuum ){
639 fossil_print("Vacuuming the database... "); fflush(stdout);
640 db_multi_exec("VACUUM");
641 fossil_print("done\n");
642
--- src/rebuild.c
+++ src/rebuild.c
@@ -632,10 +632,11 @@
632 fossil_print("%d new deltas save %,lld bytes\n", nDelta, nByte);
633 }
634 runVacuum = 1;
635 }else{
636 fossil_print("no new compression opportunities found\n");
637 runVacuum = db_int(0, "PRAGMA repository.freelist_count")>0;
638 }
639 if( runVacuum ){
640 fossil_print("Vacuuming the database... "); fflush(stdout);
641 db_multi_exec("VACUUM");
642 fossil_print("done\n");
643

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button