From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Date: Wed, 8 Jun 2022 17:08:47 +0200
Message-ID: <202206081508.pwq4ne3df2si@alvherre.pgsql> (raw)
In-Reply-To: <CA+mi_8bvD0_CW3sumgwPvWdNzXY32itoG_16tDYRu_1S2gV2iw@mail.gmail.com>
On 2022-Jun-08, Daniele Varrazzo wrote:
> Is this a problem with PQexecQuery which should not send the Close, or
> with receiving in IDLE mode which should expect a CloseComplete?
Interesting.
What that Close message is doing is closing the unnamed portal, which
is otherwise closed implicitly when the next one is opened. That's how
single-query mode works: if you run a single portal, it'll be kept open.
I believe that the right fix is to not send that Close message in
PQsendQuery.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Para tener más hay que desear menos"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, daniele.varrazzo@gmail.com
Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
In-Reply-To: <202206081508.pwq4ne3df2si@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox