[Twisted-Python] Is psycopg or pygresql better with twisted.enterprise?

Phil Christensen phil at bubblehouse.org
Mon Mar 31 14:11:20 EDT 2008

On Mar 31, 2008, at 12:32 PM, Nathan wrote:
> Is there any noticeable difference between psycopg (version 2) or
> pygresql (version 3.8.1) when used with twisted.enterprise to connect
> to postgresql?
> Pygresql hasn't been updated since June 2006, but maybe that's just
> because it's stable (?) -- I haven't used it at all, ever.
> Psycopg2 has had more recent releases, but I've experience some bugs
> with it in (non-twisted) threaded code and the web site has been down
> for weeks (months?), so I thought it wise to explore alternatives...
> Or is there a better third alternative???

I used both recently with adbapi, and everything seemed fine. I  
remember both of them missing some features that I was used to with  
MySQLdb, like customizable cursor classes and so forth, but nothing  
that was a deal-breaker.

I never ran this in production, but I did run stress tests with both  
these drivers against a copy of a production database. There were no  
driver-related issues, just syntax errors (the web app was originally  
written for MySQL, and there was a small amount of non-standard SQL).

I have run into threading issues with pretty much every driver, so I  
wouldn't discount psycopg2 because of that...

> Also, we're considering turning on SSL client-certificate verification
> on our postgresql installation -- does anyone know whether either of
> the above support SSL client certificates?

I know pygresql doesn't support this, but I'm not sure about psycopg2.


More information about the Twisted-Python mailing list