Re: Problem with ZPsycopgDA’s pool

From: Nicolas Boullis <postgresql(at)ilcode(dot)fr>
To: psycopg(at)postgresql(dot)org
Subject: Re: Problem with ZPsycopgDA’s pool
Date: 2014-04-17 22:12:00
Message-ID: 20140417221200.GB6043@coco.home
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: psycopg

Hi,

On Wed, Apr 16, 2014 at 10:47:21PM +0200, Nicolas Boullis wrote:
>
> 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.

I thought a little more about this, and I think I worked out a way to
implement this.

Here is a quick&dirty patch that does it.

I gave it a try and it works for me; at least I cannot reproduce anymore
the failures I experienced before.

Please tell me what you think of this patch.

Cheers,

--
Nicolas Boullis

Attachment Content-Type Size
ZPsycopgDA_fix_init_of_pooled_connections.diff text/x-diff 3.1 KB

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Dorian Hoxha 2014-04-27 11:03:21 Altering array(composite-types) without breaking code when inserting them
Previous Message Nicolas Boullis 2014-04-16 20:47:21 Re: Problem with ZPsycopgDA’s pool