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 1g80wC-0006s2-F3 for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 10:32:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g80wA-0004tF-0d for psycopg@arkaria.postgresql.org; Thu, 04 Oct 2018 10:32:54 +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 1g80w9-0004t8-Mu for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 10:32:53 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g80w6-0003wp-W4 for psycopg@lists.postgresql.org; Thu, 04 Oct 2018 10:32:52 +0000 Received: by mail-lj1-x231.google.com with SMTP id 63-v6so7898064ljs.4 for ; Thu, 04 Oct 2018 03:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YpJCzK7q7cfRn2wCtkkgeMtbcNEWQ9eEid9YQDHAWQM=; b=ZVtYhXp+Nbi2Ne9Vk0Gjq6+CJrSXAJQBgsgI0omBDRn4/0tInAtel0xPx1zSq2CiLk uoTeJ0+nuPG4b8FC6cIJNxKSya7jwDvzlBe2CCal7JnBROL9djoxI+4SKZnAYR+xzBeY 20bASvY1KaJXlTqmLUbP7WtlnpIgcpMLPsfl533T4ITV3ldaaU4yGHSpZx1aZrr1jKRI YA7K9nfhl8kAZe3M+sMd9Z3OfS/wXPa7/dFbL6KI/cHmUgNWeYMmR5kwNLWHPY2Jy664 nMnlefwQRCLzvkm9TEQP7TtUA7vEiCKmsUwHt5f77WyjiMfV2zjlSyS2/+rTauxdwJFc V5dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YpJCzK7q7cfRn2wCtkkgeMtbcNEWQ9eEid9YQDHAWQM=; b=RqhJA+Cr8iO03CHPhrM3lRsWj5ANG126IlikPb/V6fhKyO4ZEPMXlvBBNJ7AJNCRCL DU87VJTUhfxojHnH8U/PYxGRN7lZO78niwbnNnkJA9vsEPMPwnzoVrIvpXG2iixUW2G+ TufJAjFAkGwDZk7E2jH+rZWNTcSVafUum/xWbyjcz+pzeO41qDXP/0JhWYxs3XnSkUYY E161JFRcIMO5QlC3rSzq7lUq6TcOTh9+31i5aC6Rod0WDDQmh3+ProeyTF9iKiczeuQA /ecBkE9GPvQn/q7bcd4Bix7lqdCO00rSZKXdLK0e7l8Kv6b21C4Xo32Rzew+jQMKnC+n 4xjA== X-Gm-Message-State: ABuFfoje5GwSv/ks9Q2tvxhI1T+BZTkzd5n/U7+lo4tPRpJOHic0Vc8V FrqBkcI8bwSTQP0Yksdzy6CbqNjn1m3tz33n/AI= X-Google-Smtp-Source: ACcGV63pZ0vEx+jka1Ed9kY2yGTRs2vgYh7gB8d+9th03oeMkA9XzbzHmTubT4KQcCw4htNpG0iPisbl/iBAa50LxTo= X-Received: by 2002:a2e:9b46:: with SMTP id o6-v6mr4112842ljj.78.1538649169032; Thu, 04 Oct 2018 03:32:49 -0700 (PDT) MIME-Version: 1.0 References: <2001056273.7945904.1537909025251.ref@mail.yahoo.com> <2001056273.7945904.1537909025251@mail.yahoo.com> <1171000727.19526618.1537994198139@mail.yahoo.com> <2038369023.20583382.1538078255866@mail.yahoo.com> <106450562.4254785.1538510870700@mail.yahoo.com> <4d647279-19ae-75ea-83a7-b74b647c79bd@dndg.it> <69747703.5400338.1538599809000@mail.yahoo.com> In-Reply-To: From: Daniele Varrazzo Date: Thu, 4 Oct 2018 11:32:38 +0100 Message-ID: Subject: Re: Integration of Psycopg with XTA To: Federico Di Gregorio Cc: psycopg@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. -- Daniele