[Mimedefang] Mail::SpamAssassin::BayesStore::SQL databasepersistence.

Les Mikesell les at futuresource.com
Fri Jul 22 11:57:14 EDT 2005


On Wed, 2005-07-20 at 12:59, David F. Skoll wrote:

> > The only thing the untie_db code does in the SQL module is disconnect
> > from the database.  Since there is never a reason to do that unless we
> > are exiting (in which case it's cleaned up anyway) I commented out the
> > disconnect and undef statements.
> 
> That should be safe.
> 
> > I can now see persistent db connections, so it works, but I wonder if
> > there are any adverse affects that are eluding me.  Can you think of any?
> 
> Nope.  Because all the "per-user" settings are just stored as keys in
> the tables, it should be perfectly OK to maintain a persistent connection.
> 
> (Why didn't the SA people do it that way in the first place, I wonder?)

Can't you do the same trick that Apache::DBI uses to make mod_perl
database connections persistent?  I've forgotten too much perl to
describe how it overrides the normal dbi operation but basically
it intercepts connect/disconnect attempts and caches the initial
connections without changing the calling code.

-- 
  Les Mikesell
   les at futuresource.com





More information about the MIMEDefang mailing list