[mod_python] Data Base Drivers

Matthew D. Wood woodm at equire.com
Wed Aug 22 09:14:08 EST 2001


So, I've been trying to find a good connection module for PostgreSQL and 
Python.

There appears to be a bunch out there (PyGreSQL, PoPy, ...) but I have 
no idea which ones are better than others.

Unfortunately, most people on the lists that deal with such issues (the 
PyGreSQL list for example) tend to be VERY one sided and thus obtaining 
actual information is quite difficult.  Thus, I pose the question to the 
mod-python list in hopes that someone uses PostgreSQL and that there can 
be a reasonable discussion regarding the quality of the connection modules.


The second question I have is in regards to thread-safety and how it 
relates to multiple data-base connections (caused by multiple servers 
that apache runs).  The Python SIG on database connections gives a 
thread-safety parameter which is to be assigned a value of 1 to 4.  I 
believe that 4 is "Iron Clad" in that you will NOT screw up the data in 
your database no matter what.  And a 1 states that threads are not dealt 
with intelligently, use at your own risk.


I don't understand much of what the intermediate levels (2, 3) are all 
about.  What should be required for the multiple connections caused by 
multiple servers?  "Will a thread-safety level of 3 be sufficient to 
prevent problems, or do I need to find a connection that is a full blown 
4?"




More information about the Mod_python mailing list