* 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*
This commit is contained in:
parent
abe8c8c2aa
commit
7959354379
9
externals/Makefile.am
vendored
9
externals/Makefile.am
vendored
|
@ -1,11 +1,11 @@
|
|||
# Berkeley DB
|
||||
|
||||
DB = db-4.1.25
|
||||
DB = db-4.2.52
|
||||
|
||||
$(DB).tar.gz:
|
||||
@echo "Nix requires Berkeley DB to build."
|
||||
@echo "Please download version 4.1.25 from"
|
||||
@echo " http://www.sleepycat.com/update/snapshot/db-4.1.25.tar.gz"
|
||||
@echo "Please download version 4.2.52 from"
|
||||
@echo " http://www.sleepycat.com/update/snapshot/db-4.2.52.tar.gz"
|
||||
@echo "and place it in the externals/ directory."
|
||||
false
|
||||
|
||||
|
@ -21,7 +21,8 @@ build-db: have-db
|
|||
cd $(DB)/build_unix && \
|
||||
CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
../dist/configure --prefix=$$pfx/inst \
|
||||
--enable-cxx --disable-shared && \
|
||||
--enable-cxx --disable-shared --disable-cryptography \
|
||||
--disable-replication --disable-verify && \
|
||||
make && \
|
||||
make install)
|
||||
touch build-db
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue