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 1g80zy-00075H-KU for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 10:36:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g80zw-0005lJ-UL for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 10:36:48 +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 1g80zw-0005lC-MH for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 10:36:48 +0000 Received: from mail.dndg.it ([178.32.136.2]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g80zt-00042l-5w for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 10:36:47 +0000 Received: from [10.94.33.108] (93-50-194-114.ip153.fastwebnet.it [93.50.194.114]) by mail.dndg.it (Postfix) with ESMTPSA id 43830A02E0 for ; Thu, 4 Oct 2018 10:42:06 +0000 (UTC) Subject: Fwd: Re: Integration of Psycopg with XTA References: To: psycopg@lists.postgresql.org From: Federico Di Gregorio Organization: DNDG srl X-Forwarded-Message-Id: Message-ID: Date: Thu, 4 Oct 2018 12:36:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SURBL_BLOCKED, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/04/2018 12:30 PM, Daniele Varrazzo wrote: > On Thu, Oct 4, 2018 at 11:24 AM Federico Di Gregorio wrote: >> On 10/04/2018 12:13 PM, Daniele Varrazzo wrote: >>> On Thu, Oct 4, 2018 at 10:33 AM Federico Di Gregorio wrote: >>>> @Daniele, I see that a capsule has an implicit state, "invalid" 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 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 after the connection has 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 everything works we can integrate it for 2.8. federico -- Federico Di Gregorio federico.digregorio@dndg.it DNDG srl http://dndg.it Gli avvoltoi cinesi si nutrono di arte, ma possono anche mangiare i `domani'. -- Haruki Murakami