upgrades

Matthias Andree matthias.andree at gmx.de
Thu Nov 11 03:31:47 CET 2004


Clint Adams <schizo at debian.org> writes:

> Since I'm going to want to switch to db4.3 soon, I propose the following
> auto-upgrade code.  I haven't tested this at all.

And I don't want it at all.

1. db->upgrade is a destructive operation
   - running such automatically is not an option, as a violation of the
   principle of least astonishment.

2. db->upgrade is an extremely rare operation that doesn't warrant code
   duplication; there is already db_upgrade.

3. we don't need it. Berkeley DB 4.3 can happily work on Berkeley DB 3.1
   word lists, because the Btree on-disk format last changed in BDB 3.1.

3b. We don't care about Berkeley DB 3.0 -> anything upgrades because no
    *stable* bogofilter version has ever supported Berkeley DB 3.0.

4. it doesn't work. We need to remove the old environment so as to
   support the log file format update.

The upgrade just means taking a backup and then nuking the environment,
leaving just the wordlist.db.

The relevant documentation is:

,-----------------------------------------------------------------------
|If the application has a Berkeley DB transactional environment, and the
|log files need upgrading but the databases do not, the application may
|be installed in the field using the following steps:
|
|  1. Shut down the old version of the application.
|  2. Run recovery on the database environment using the DB_ENV->open
|     method or the db_recover utility.
|  3. Remove any Berkeley DB environment using the DB_ENV->remove method
|     or an appropriate system utility.
|  4. Archive the database environment for catastrophic recovery. See
|     Archival procedures for more information.
|  5. Recompile and install the new version of the application.
|  6. Restart the application. 
`--------------- SleepyCat, BerkeleyDB.4.3/docs/ref/upgrade/process.html

-- 
Matthias Andree



More information about the bogofilter-dev mailing list