suppressing db transaction feature?
Matthias Andree
matthias.andree at gmx.de
Sat Nov 13 11:53:24 CET 2004
W M Brelsford <k2di2 at att.net> writes:
> I think this question was asked and answered, but I can't find it
> in the archives.
>
> Is there (or could there be) a configuration option to turn off the
> new Berkeley DB transaction feature? I'd like to do that because:
Not yet, but if you're using BerkeleyDB 4.2 or 4.3, you can switch
_logging_ off which is the most prominent side effect of transactions,
as shown in doc/README.db in the "DANGEROUS" section:
for BerkeleyDB 4.2:
echo set_flags DB_TXN_NOT_DURABLE >>~/.bogofilter/DB_CONFIG
for BerkeleyDB 4.3:
echo set_flags DB_LOG_INMEMORY >>~/.bogofilter/DB_CONFIG
I have no experience how bogofilter behaves after a crash though.
It will attempt recovery which will fail due to the missing logs.
> - the large new additional files complicate backups and
> moving the database to other computers, which I do
> frequently (e.g. via a USB flash drive to a remote
> machine).
You can still use db_checkpoint -1h ~/.bogofilter and then
db_archive -dh ~/.bogofilter to get rid of the old logs, and you can set
the maximum log file size.
To get the database to another machine, bogoutil (with -d or -l option)
comes in handy, and you're independent of the database format or version
on the target machine.
> As an alternative, tdb seems to work, but creates a 50%-larger
> database file. (BTW, README.tdb says "configure --with-tdb"
> instead of "configure --with-database=tdb".)
Fixed in CVS, thank you.
The faster alternative is QDBM. --with-database=qdbm
See http://qdbm.sourceforge.net.
--
Matthias Andree
More information about the Bogofilter
mailing list