The system used to maintain a pool of persistent connected database
authorMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 15 Mar 2007 20:46:28 +0000 (20:46 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 15 Mar 2007 20:46:28 +0000 (20:46 +0000)
commit35615d0c5565e79e19bd8cd88dcc2c48aea968d2
tree73a975ffea336ba615d6caf06a48cb18feefa020
parent9f00394bec255a4dcbec660eba252c9b43be85af
The system used to maintain a pool of persistent connected database
sessions for performance.  However, the postgresql libraries seem to
have been compiled with thread-safety support disabled.  Despite only
one thread using a connection from the pool at a time, a thread being
assigned a connection previouly initiated by another thread (i.e. the
first client connection causes the first thread to spawn a "page" of
connections in the pool) would no longer be able to perform requests
on that inherited connection.

Explicitely openning/closing a db connection per session solves this
problem for now, although at a performance cost, of course.   I shall
resume testing with persistent connections on another box on which
I'll compile the postgresql client library with thread-safety support
eventually.
mmsoftware/mmmail/src/mmpop3d/mmpop3d.c
mmsoftware/mmmail/src/mmsmtpd/mmsmtpd.c