Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
On 04/28/2016 08:09 PM, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
Hurray for PEP 249!
Well, actually the spec could be better/clearer, but at least it's there ;)
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
Googling psycopg2 vs pygresql gives a number of hits, but not very helpful.
There is a licensing difference. PyGreSQL is MIT, psychopg2 is GPL (though one post describes it as "a bizarre hacked-up license"). https://github.com/psycopg/psycopg2/blob/master/LICENSE
A number of posts talk about PyGreSQL being unmaintained, but this no longer seems to be the case. Their svn has been pretty active the last couple years. Otoh, one post complains that the psycopg2 website (though not the code) is unmaintained. http://it.toolbox.com/blogs/database-soup/postgres-needs-a-new-python-driver...
PyGreSQL doesn't support all postgres data types (or didn't?). We're used to that, though.
On 04/28/2016 08:09 PM, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
seems to be working well here so far
On Thu, Apr 28, 2016 at 8:09 PM, Mike Bonnet mikeb@redhat.com wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
I'm curious as to why you didn't choose pg8000 (a pure-Python module) over pycopg2 (a Python extension)?
Dne 29.4.2016 v 02:09 Mike Bonnet napsal(a):
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported.
We chose the psycopg2 in Spacewalk when we migrated from Oracle. Spacewalk can put DB under very big load (even Oracle). And we had no performance issues and no troubles with psycopg2 and PG. I cannot give reference to other modules mentioned in this thread.
On 04/28/2016 11:04 PM, Neal Gompa wrote:
On Thu, Apr 28, 2016 at 8:09 PM, Mike Bonnet mikeb@redhat.com wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
I'm curious as to why you didn't choose pg8000 (a pure-Python module) over pycopg2 (a Python extension)?
Well, we haven't chosen anything yet. Psycopg2 just seems to be the most popular. For this use, I don't think pure python matters much to us.
We can certainly evaluate other options. Here is the list from the postgres site: https://wiki.postgresql.org/wiki/Python
(granted all other options besides the three listed so far appear unmaintained)
On Thu, Apr 28, 2016 at 05:09:19PM -0700, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
+1. I've been using psycopg2 (through sqlalchemy) for every project over the last 5 years and haven't had a snag yet.
On 4/28/16 7:56 PM, Mike McLean wrote:
On 04/28/2016 08:09 PM, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
seems to be working well here so far
Can you tell if it fixes the backslash-quoting issue we were seeing with PyGreSQL and PostgreSQL 9.4 (standard_conforming_strings = on)?
On 04/29/2016 03:59 PM, Mike Bonnet wrote:
On 4/28/16 7:56 PM, Mike McLean wrote:
On 04/28/2016 08:09 PM, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
seems to be working well here so far
Can you tell if it fixes the backslash-quoting issue we were seeing with PyGreSQL and PostgreSQL 9.4 (standard_conforming_strings = on)?
It appears so, as the postgres I'm running is also 9.4 with standard options and I'm not seeing the issue. However, it looks like the much newer version in PyGreSQL here fixes it as well.
still, I should investigate all that a little deeper
On Fri, Apr 29, 2016 at 10:33 AM, Ralph Bean rbean@redhat.com wrote:
On Thu, Apr 28, 2016 at 05:09:19PM -0700, Mike Bonnet wrote:
Hi! As an exercise, I looked in to what it would take to port Koji from PyGreSQL to psycopg2. Turns out, it didn't take much at all:
https://pagure.io/fork/mikeb/koji/c/676db88a8bd4c729278ef4594c9174be5b554b2f
Now, do we think this is a good idea? I haven't done any performance testing, but in general it seems like pycopg2 is better supported. Thoughts?
+1. I've been using psycopg2 (through sqlalchemy) for every project over the last 5 years and haven't had a snag yet.
Agreed that psycopg2 is very stable in the places I've used it, and it would be a fine fit for Koji.
- Ken
koji-devel@lists.fedorahosted.org