database copying and compacting

Matthias Andree matthias.andree at gmx.de
Sun Nov 7 18:02:25 CET 2004


Jef Poskanzer <jef at acme.com> writes:

> Question, is there an option in this version to not use the transactional
> mode?  I don't feel too strongly about it, but if the flag is there
> I'd use it.  I haven't had any database problems since a very early
> version, and if I ever do have one I'll find out about it within a week
> and be able to restore the previous week's db backup file.  With the
> transactional code, it sounds like I won't even be able to make a valid
> backup file without using this special script.

Not at this time although an import of the DB_CONCURRENT stuff is
pending.

NOTE: the remainder of this mail assumes your bogofilter database lives
in the ~/.bogofilter directory. If it doesn't, you must adjust the paths.

If you want to get rid of the log files automatically (only works with a
recent BerkeleyDB), do:

echo set_flags DB_DB_LOG_AUTOREMOVE >>~/.bogofilter/DB_CONFIG

To reduce the maximum log file size to 256 kB (default 10 MB), do:

echo set_lg_max 262144 >>~/.bogofilter/DB_CONFIG


If you don't care about durability and prefer a database that lives
dangerously, can do:

echo set_flags DB_TXN_NOT_DURABLE >>~/.bogofilter/DB_CONFIG

and defeat all logging. It will defeat data base recovery, and may thus
require a data base rebuild from scratch after a crash of either bogo*
application or the system. (In my test, I have got a single log file
that was 28 bytes in size but didn't grow.)

-- 
Matthias Andree



More information about the Bogofilter mailing list