From: Taiki Koshino <koshino@sraoss.co.jp>
To: pgpool-committers@lists.postgresql.org
Subject: pgpool: Fix extended-protocol DISCARD ALL and statement reuse after DIS
Date: Wed, 21 Oct 2026 02:16:43 +0000
Message-ID: <E1xJLsh-00000008gaL-1JVl@gothos.postgresql.org> (raw)
Fix extended-protocol DISCARD ALL and statement reuse after DISCARD PLANS.
DISCARD ALL cleared the sent message list before CommandComplete()
finished using the current query context, causing a "no query context"
error and closing the frontend connection. Defer cleanup until the
context is no longer needed.
DISCARD PLANS also removed saved Query and Parse messages, although
PostgreSQL preserves prepared statements. Keep these records so that
subsequent Bind messages can reuse the statements without another Parse.
Author: Taiki Koshino(koshino@sraoss.co.jp)
Discussion: https://github.com/pgpool/pgpool2/issues/175
Backpatch-through: v4.3
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=4608d80ddf8dac6e80281b01b7cff05b0d7b6...
Modified Files
--------------
src/protocol/CommandComplete.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgpool-committers@postgresql.org
Cc: koshino@sraoss.co.jp
Subject: Re: pgpool: Fix extended-protocol DISCARD ALL and statement reuse after DIS
In-Reply-To: <E1xJLsh-00000008gaL-1JVl@gothos.postgresql.org>
References: <E1xJLsh-00000008gaL-1JVl@gothos.postgresql.org>
* 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