Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8AJg-0004rA-Fw for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 20:33:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8AJd-0004cD-6q for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 20:33:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8AJc-0004c5-PT for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 20:33:45 +0000 Received: from sonic305-21.consmr.mail.ir2.yahoo.com ([77.238.177.83]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8AJU-00008l-UU for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 20:33:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1538685214; bh=HdL/ZFNEidaPBot1KMQCWwQnUjw5Ce3uZzEhVd5fodk=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=o6DesJuGyh1ZNmd3bBVUJOiMh+5x4zzxl6rY/2cqNpC99evyMZFQHoZHskUl73S+2q0vR9l+LyIzm0GlChKvcSWlHYCjAPQtrAaWoIajttEZeyqmIWXjH3Pz26w9z0vD5O9yVgzce8roIoipHoPiiM8TLyjAv3IZBNaQjn71H3hcyi+WP3ifGL8XuaFbDi4mTX8bLszICwZ54Ig2vOXF5AaINfrxjTgs6/cd6ioU9V+boIQM/s0QfzdpN+ovSqkDdTlNdmR7MBf7SGSTIv+SOia0+zz/nFFJWRqwdpTfFsnsH3HGf+dHfK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eQ Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ir2.yahoo.com with HTTP; Thu, 4 Oct 2018 20:33:34 +0000 Date: Thu, 4 Oct 2018 20:33:31 +0000 (UTC) From: Christian Ferrari Reply-To: Christian Ferrari To: psycopg@lists.postgresql.org Message-ID: <1005537726.6324310.1538685211791@mail.yahoo.com> In-Reply-To: References: Subject: Re: Integration of Psycopg with XTA MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6324309_405398174.1538685211789" X-Mailer: WebService/1.1.12512 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 Content-Length: 6643 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_6324309_405398174.1538685211789 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Federico,I will test it as soon as it will be released on git.Kind Reg= ardsCh.F. ------------------------------------------------------------- Good design can't stop bad implementation =20 Il gioved=C3=AC 4 ottobre 2018, 12:36:53 CEST, Federico Di Gregorio ha scritto: =20 =20 On 10/04/2018 12:30 PM, Daniele Varrazzo wrote: > On Thu, Oct 4, 2018 at 11:24 AM Federico Di Gregorio=C2=A0 = wrote: >> On 10/04/2018 12:13 PM, Daniele Varrazzo wrote: >>> On Thu, Oct 4, 2018 at 10:33 AM Federico Di Gregorio=20 wrote: >>>> @Daniele, I see that a capsule has an implicit state, "invalid" if th= e >>>> pointer inside it is null. Does it makes sense to reuse the same=20 capsule >>>> and keep a reference to it to be able to invalidate it when the >>>> connection is closed? >>> I can take a look at it but I suspect it's a lot of work for a feature >>> very rarely used. >> Nah, I can do it. I was just asking for your opinion. :D > I don't know much about the capsule object, its life cycle etc. Yes, > not a huge deal saving it in the connection state and returning always > the same. I just wonder if it's worth the effort. I suppose it helps to debug the situation where the capsule is used=20 after the connection has been closed. Instead of a BOOM you get a nice=20 exception (if the consumer checks for it, obviously). I'll work on this in my repo and if everything works we can integrate it=20 for 2.8. federico --=20 Federico Di Gregorio=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 federico.digregorio@dndg.it DNDG srl=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://dndg.it =C2=A0 Gli avvoltoi cinesi si nutrono di arte, ma possono anche mangiare =C2=A0 =C2=A0 i `domani'.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 -- Haruki Murakami =20 ------=_Part_6324309_405398174.1538685211789 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear Federico,=
I will test it as soon as it will be released on git.
= Kind Regards
Ch.F.

-------------------------------------------------------------=
Good design can't stop bad implement= ation


=20
=20
Il gioved=C3=AC 4 ottobre 2018, 12:36:53 CEST, Federico= Di Gregorio <fog@dndg.it> ha scritto:


On 10/04/2018 12:30 PM, Daniele Varra= zzo wrote:
> On Thu, Oct 4, 2018 at 11:24 AM = Federico Di Gregorio<fog@dndg.it>  wrote:
= >> On 10/04/2018 12:13 PM, Daniele Varrazzo wrote:
>>> On Thu, Oct 4, 2018 at 10:33 AM Federico Di Gregorio= <fog@d= ndg.it>
wrote:
= >>>> @Daniele, I see that a capsule has an implicit state, "in= valid" if the
>>>> pointer inside it= is null. Does it makes sense to reuse the same
= capsule
>>>> and keep a reference to= it to be able to invalidate it when the
>>= ;>> connection is closed?
>>> I c= an take a look at it but I suspect it's a lot of work for a feature
>>> very rarely used.
>> Nah, I can do it. I was just asking for your opinion. :D
> I don't know much about the capsule object, its l= ife cycle etc. Yes,
> not a huge deal saving = it in the connection state and returning always
= > the same. I just wonder if it's worth the effort.

I suppose it helps to debug the situation = where the capsule is used
after the connection h= as been closed. Instead of a BOOM you get a nice
exception (if the consumer checks for it, obviously).

I'll work on this in my repo and if everyt= hing works we can integrate it
for 2.8.

federico

--
Federico Di G= regorio                   = ;     federico.digregorio@dndg.it
DNDG srl                &n= bsp;                     =             http://dndg.it
&= nbsp; Gli avvoltoi cinesi si nutrono di arte, ma possono anche mangiare
    i `domani'.       = ;                     &nb= sp;           -- Haruki Murakami

------=_Part_6324309_405398174.1538685211789--