No more cleanup hooks. The OS can reclaim memory better than we can. We want to...
[citadel.git] / citadel / database.c
index 0f6121e1fa7837865bb7f9f808e89632d4b739aa..2f6a5b5cedfe41f1b17fa58a0aba7a0cc037ef05 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This is a data store backend for the Citadel server which uses Berkeley DB.
  *
- * Copyright (c) 1987-2020 by the citadel.org team
+ * Copyright (c) 1987-2021 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
@@ -317,7 +317,7 @@ void close_databases(void) {
 
        syslog(LOG_INFO, "db: performing final checkpoint");
        if ((ret = dbenv->txn_checkpoint(dbenv, 0, 0, 0))) {
-               syslog(LOG_ERR, "txn_checkpoint: %s", db_strerror(ret));
+               syslog(LOG_ERR, "db: txn_checkpoint: %s", db_strerror(ret));
        }
 
        syslog(LOG_INFO, "db: flushing the database logs");
@@ -325,11 +325,6 @@ void close_databases(void) {
                syslog(LOG_ERR, "db: log_flush: %s", db_strerror(ret));
        }
 
-#ifdef DB_STAT_ALL
-       /* print some statistics... */
-       dbenv->lock_stat_print(dbenv, DB_STAT_ALL);
-#endif
-
        /* close the tables */
        syslog(LOG_INFO, "db: closing databases");
        for (i = 0; i < MAXCDB; ++i) {
@@ -341,6 +336,12 @@ void close_databases(void) {
 
        }
 
+       // This seemed nifty at the time but did anyone really look at it?
+       // #ifdef DB_STAT_ALL
+       // /* print some statistics... */
+       // dbenv->lock_stat_print(dbenv, DB_STAT_ALL);
+       // #endif
+
        /* Close the handle. */
        ret = dbenv->close(dbenv, 0);
        if (ret) {