X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fexpire%2Fserv_expire.c;fp=citadel%2Fmodules%2Fexpire%2Fserv_expire.c;h=e9d52264744d42e9380dbf3ab504b687ddaa895c;hb=51f7adc5ec5f718147aa677dd69a3cc194e2bde5;hp=7fd28e6b4a699217d90d094fc8f8ee6ac9866ee1;hpb=7b92376d3c819cfe849b92dfc5c312084408af9c;p=citadel.git diff --git a/citadel/modules/expire/serv_expire.c b/citadel/modules/expire/serv_expire.c index 7fd28e6b4..e9d522647 100644 --- a/citadel/modules/expire/serv_expire.c +++ b/citadel/modules/expire/serv_expire.c @@ -905,17 +905,15 @@ void purge_databases(void) syslog(LOG_NOTICE, "Processed %d message reference count adjustments.", retval); } - // Enable this after we've tested it and make it a site-configurable option. - // This will allow the database files to shrink when they can. - // if (!server_shutting_down) - // { - // cdb_compact(); - // } + if ( (!server_shutting_down) && (CtdlGetConfigInt("c_shrink_db_files") != 0) ) + { + cdb_compact(); // Shrink the DB files on disk + } if (!server_shutting_down) { syslog(LOG_INFO, "Auto-purger: finished."); - last_purge = now; /* So we don't do it again soon */ + last_purge = now; // So we don't do it again soon force_purge_now = 0; } else {