[Twisted-Python] Is psycopg or pygresql better with twisted.enterprise?
![](https://secure.gravatar.com/avatar/826694d326649b5e681474e8e2116dc1.jpg?s=120&d=mm&r=g)
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??? 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? Opinions? ~ Nathan
![](https://secure.gravatar.com/avatar/dd1243740a09f0676ef225404105cfc0.jpg?s=120&d=mm&r=g)
On Mar 31, 2008, at 12:32 PM, Nathan wrote:
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...
I know pygresql doesn't support this, but I'm not sure about psycopg2. -phil
![](https://secure.gravatar.com/avatar/dd480f3907b1cbbae9e5d53ae5b56ef4.jpg?s=120&d=mm&r=g)
On Mon, Mar 31, 2008 at 12:32 PM, Nathan <nathan.stocks@gmail.com> wrote:
I have found psycopg 2 to be faster. I do not have the data anymore but I use it in production and works great.
What bugs are you experiencing? What version are you using? We use psycopg2-2.0.6svn in production and has been fine.
I do not know if psycopg supports this.
Opinions?
If you run psycopg you may want to use the patch in ticket #2488 it helps performance. http://twistedmatrix.com/trac/ticket/2488
![](https://secure.gravatar.com/avatar/7c39d1649d343d42a882de4d3d34b86b.jpg?s=120&d=mm&r=g)
We using psycopg1 for the data synchronization between MySQL\PostgreSQL, MSSQL\PostgreSQL and etc... psycopg2 is "faster" but very buggy in the 256/24/7 systems. We use older version and it better choose for us, stability is in the priority. Christopher Zorn wrote:
-- """ Best regards, Alexander Burtsev. Web Development Department, TV Channel 'Sport' http://sportbox.ru http://burus.org """
![](https://secure.gravatar.com/avatar/7c39d1649d343d42a882de4d3d34b86b.jpg?s=120&d=mm&r=g)
Yeap! It's from my favorite jokes. =) With psycopg2 it's may be true. J. Cliff Dyer wrote:
-- """ Best regards, Alexander Burtsev. Web Development Department, TV Channel 'Sport' http://sportbox.ru http://burus.org """
![](https://secure.gravatar.com/avatar/826694d326649b5e681474e8e2116dc1.jpg?s=120&d=mm&r=g)
Just to wrap this thread up, I've settled on psycopg2. It supports SSL with server-/client-certificate verification while pygresql does not. Also, I've found that though the psycopg2 web site is generally down (and out-of-date), the author _is_ actively developing psycopg2, and even released version 2.0.7 _today_, which fixes a good number of outstanding issues. ~ Nathan
![](https://secure.gravatar.com/avatar/dd1243740a09f0676ef225404105cfc0.jpg?s=120&d=mm&r=g)
On Mar 31, 2008, at 12:32 PM, Nathan wrote:
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...
I know pygresql doesn't support this, but I'm not sure about psycopg2. -phil
![](https://secure.gravatar.com/avatar/dd480f3907b1cbbae9e5d53ae5b56ef4.jpg?s=120&d=mm&r=g)
On Mon, Mar 31, 2008 at 12:32 PM, Nathan <nathan.stocks@gmail.com> wrote:
I have found psycopg 2 to be faster. I do not have the data anymore but I use it in production and works great.
What bugs are you experiencing? What version are you using? We use psycopg2-2.0.6svn in production and has been fine.
I do not know if psycopg supports this.
Opinions?
If you run psycopg you may want to use the patch in ticket #2488 it helps performance. http://twistedmatrix.com/trac/ticket/2488
![](https://secure.gravatar.com/avatar/7c39d1649d343d42a882de4d3d34b86b.jpg?s=120&d=mm&r=g)
We using psycopg1 for the data synchronization between MySQL\PostgreSQL, MSSQL\PostgreSQL and etc... psycopg2 is "faster" but very buggy in the 256/24/7 systems. We use older version and it better choose for us, stability is in the priority. Christopher Zorn wrote:
-- """ Best regards, Alexander Burtsev. Web Development Department, TV Channel 'Sport' http://sportbox.ru http://burus.org """
![](https://secure.gravatar.com/avatar/7c39d1649d343d42a882de4d3d34b86b.jpg?s=120&d=mm&r=g)
Yeap! It's from my favorite jokes. =) With psycopg2 it's may be true. J. Cliff Dyer wrote:
-- """ Best regards, Alexander Burtsev. Web Development Department, TV Channel 'Sport' http://sportbox.ru http://burus.org """
![](https://secure.gravatar.com/avatar/826694d326649b5e681474e8e2116dc1.jpg?s=120&d=mm&r=g)
Just to wrap this thread up, I've settled on psycopg2. It supports SSL with server-/client-certificate verification while pygresql does not. Also, I've found that though the psycopg2 web site is generally down (and out-of-date), the author _is_ actively developing psycopg2, and even released version 2.0.7 _today_, which fixes a good number of outstanding issues. ~ Nathan
participants (5)
-
Burus Gmail
-
Christopher Zorn
-
J. Cliff Dyer
-
Nathan
-
Phil Christensen