Fossil SCM
The "fossil repack" command should run VACUUM if either new compression opportunities were found *or* if the freelist count is positive.
Commit
4d9ede80bec62b687ec8c93a66911e1d808540d93a3d84d111808e7b34e50b44
Parent
5c5e54928ed382e…
1 file changed
+1
+1
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -632,10 +632,11 @@ | ||
| 632 | 632 | fossil_print("%d new deltas save %,lld bytes\n", nDelta, nByte); |
| 633 | 633 | } |
| 634 | 634 | runVacuum = 1; |
| 635 | 635 | }else{ |
| 636 | 636 | fossil_print("no new compression opportunities found\n"); |
| 637 | + runVacuum = db_int(0, "PRAGMA repository.freelist_count")>0; | |
| 637 | 638 | } |
| 638 | 639 | if( runVacuum ){ |
| 639 | 640 | fossil_print("Vacuuming the database... "); fflush(stdout); |
| 640 | 641 | db_multi_exec("VACUUM"); |
| 641 | 642 | fossil_print("done\n"); |
| 642 | 643 |
| --- 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 |