[Spambayes-checkins] website faq.txt,1.30,1.31
Tony Meyer
anadelonbrin at users.sourceforge.net
Wed Aug 13 01:16:41 EDT 2003
Update of /cvsroot/spambayes/website
In directory sc8-pr-cvs1:/tmp/cvs-serv8612
Modified Files:
faq.txt
Log Message:
Add a FAQ about how to use a pickle. The bit about why is a bit vague
(stolen from memory and storage.py) and could be elaborated on if someone
feels like it.
Also links between this section and the one about not using dumbdbm.
Index: faq.txt
===================================================================
RCS file: /cvsroot/spambayes/website/faq.txt,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** faq.txt 12 Aug 2003 19:32:28 -0000 1.30
--- faq.txt 13 Aug 2003 07:16:39 -0000 1.31
***************
*** 823,826 ****
--- 823,854 ----
+ How do I use a pickle for storage?
+ ----------------------------------
+
+ If you don't want to use one of the dbm methods for storage (if you only
+ have `dumbdbm <#my-database-keeps-getting-corrupted>`_, for example), or
+ one of the SQL methods, you can use a pickle (of a giant in-memory Python
+ dict). A pickle will be relatively small, but slower, compared to using
+ of the the dbm storage methods.
+
+ To use a pickle, set the option "persistent_use_database" to False in your
+ `configuration file <#how-do-i-configure-pop3proxy-imapfilter-etc-without-a-web-browser>`_,
+ in the section "Storage" (if you have been using SpamBayes for a while,
+ check that you don't have an old version of this option elsewhere in your
+ configuration file, in the pop3proxy or hammiefilter sections). You may
+ also wish to change the name of the storage file (to end with "pck", for
+ example), but this is not necessary - to do so, change the
+ "persistent_storage_file" option (also in the "Storage" section).
+
+ If you specify your database on the command line ("pop3proxy.py -d hammie.db",
+ for example), then you should use the "-D" switch instead. Note, however,
+ that it is likely that these switches will change in a future release, and
+ using the configuration file is a much safer option.
+
+ Note that if you have an existing database, which is not a pickle, you can
+ not keep using it - this will cause errors. You need to either retrain
+ from scratch, or use the dbExpImp script to convert it to a pickle.
+
+
Known Problems & Workarounds
============================
***************
*** 840,844 ****
SpamBayes' case, always the wrong one. Some versions of dumbdbm have a bug
that will cause database corruption, but you shouldn't be using it anyway,
! as it is very inefficient. Instead, either use a pickle or install `pybsddb`_
(bsddb3) and use that instead. If you are not sure which database systems
you have available, and/or which one you are currently using, there is a
--- 868,873 ----
SpamBayes' case, always the wrong one. Some versions of dumbdbm have a bug
that will cause database corruption, but you shouldn't be using it anyway,
! as it is very inefficient. Instead, either
! `use a pickle <#how-do-i-use-a-pickle-for-storage>`_ or install `pybsddb`_
(bsddb3) and use that instead. If you are not sure which database systems
you have available, and/or which one you are currently using, there is a
More information about the Spambayes-checkins
mailing list