Re: Problem with ZPsycopgDA’s pool - Mailing list psycopg

From Nicolas Boullis
Subject Re: Problem with ZPsycopgDA’s pool
Date
Msg-id 20140416204721.GA14728@coco.home
Whole thread Raw
In response to Re: [psycopg] Problem with ZPsycopgDA’s pool  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: Problem with ZPsycopgDA’s pool  (Nicolas Boullis <postgresql@ilcode.fr>)
List psycopg
Hi Daniele,

On Wed, Apr 16, 2014 at 03:20:20PM +0100, Daniele Varrazzo wrote:
>
> I think it is a known issue. Could be a manifestation of this bug:
> http://psycopg.lighthouseapp.com/projects/62710/tickets/155

Thanks for pointing this.
I had a look at the patch by zagy and it looks much like what I had in
mind.
I would also have suggested to have a pool per DB instance rather than
per dsn, just as he suggested, because a Zope instance may contain
several ZPsycopgDA connectors to the same dsn, but with different
settings (especially different character encodings).
That kind of defeats the point of the connection pool.

Ideally, I think the connection should be initialized the first time it
is used for a given page. That would be perfecty compatible with a
per-dsn pool. But, with my very limited knowledge of Zope internals, I
can’t find a way to get such a behaviour.


> Patches are very welcome: I don't get the Zope model at all and I
> can't assess if we have ever changed the behaviour on course or if
> this issue has ever existed.
>
> Tests are welcome too, as well as somebody who cares enough about zope
> to maintain the adapter.

Hmmm…
As I wrote previously, I have to keep running some old Zope2
applications that user ZPsycopgDA, so I am somewhat concerned.
But, to be honnest, I don't really like Zope, and I’m willing to rewrite
those applications with a different (Python) framework.
So I’ll be happy to help, as long as I am concerned (probably for a few
years, I am afraid). But I wouldn’t say that I care much about Zope.


Cheers,

--
Nicolas Boullis


psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: [psycopg] Problem with ZPsycopgDA’s pool
Next
From: Nicolas Boullis
Date:
Subject: Re: Problem with ZPsycopgDA’s pool