about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-01-07T15·53+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-01-07T15·53+0000
commit7959354379416bd8513cb00e636c0310e42eaa01 (patch)
tree075f502ef3f4153c9695e3bfabf56d0bf8e1fc0c /src/libstore
parentabe8c8c2aa24646955b78cd2c826483d8d8a1149 (diff)
* Upgraded to Berkeley DB 4.2.52. The main advantage of 4.2 is that
  it automatically removes log files when they are no longer needed.

  *** IMPORTANT ***

  If you have an existing Nix installation, you must checkpoint the
  Nix database to prevent recent transactions from being undone.  Do
  the following:

  - optional: make a backup of $prefix/var/nix/db.

  - run `db_checkpoint' from Berkeley DB 4.1:
  
    $ db_checkpoint -h $prefix/var/nix/db -1

  - optional (?): run `db_recover' from Berkeley DB 4.1:

    $ db_recover -h $prefix/var/nix/db

  - remove $prefix/var/nix/db/log* and $prefix/var/nix/db/__db*
    

Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/db.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc
index a97111a3a96d..72823be8bbf6 100644
--- a/src/libstore/db.cc
+++ b/src/libstore/db.cc
@@ -160,7 +160,7 @@ void Database::open(const string & path)
         env->set_lg_bsize(32 * 1024); /* default */
         env->set_lg_max(256 * 1024); /* must be > 4 * lg_bsize */
         env->set_lk_detect(DB_LOCK_DEFAULT);
-        env->set_flags(DB_TXN_WRITE_NOSYNC, 1);
+        env->set_flags(DB_TXN_WRITE_NOSYNC | DB_LOG_AUTOREMOVE, 1);
         
 
         /* The following code provides automatic recovery of the