pg.ddx.io  pgpool-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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:15 +0000
Message-ID: <E1xJLsE-00000008gM9-41TR@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_5_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=a4217268bd0c3567c1002b60fdbf7d1537844...

Modified Files
--------------
src/protocol/CommandComplete.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1xJLsE-00000008gM9-41TR@gothos.postgresql.org>
Permalink:  ../E1xJLsE-00000008gM9-41TR@gothos.postgresql.org/
Also on:    postgresql.org/message-id/E1xJLsE-00000008gM9-41TR@gothos.postgresql.org

 · 

reply

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: <E1xJLsE-00000008gM9-41TR@gothos.postgresql.org>
  References: <E1xJLsE-00000008gM9-41TR@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