Re: Fix extended-protocol DISCARD handling.

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: koshino(at)sraoss(dot)co(dot)jp
Cc: pgpool-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix extended-protocol DISCARD handling.
Date: 2026-10-14 01:08:06
Message-ID: 20261014.100806.1866925170684351518.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-hackers

Thank you for the patch!

> Hi,
>
> The attached patch fixes two issues with DISCARD commands in the
> extended query protocol.
>
> DISCARD ALL cleared the sent message list while CommandComplete()
> was still using the current query context, causing a "no query context"
> error. The patch defers clearing the list until the query context is
> no longer needed.
>
> DISCARD PLANS also cleared saved Query and Parse messages, although
> PostgreSQL keeps prepared statements. The patch preserves these
> messages so that subsequent Bind messages can reuse them.
>
>
> This issue was originally reported here:
> https://github.com/pgpool/pgpool2/issues/175

The patch looks good to me.

Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Browse pgpool-hackers by date

  From Date Subject
Next Message Nadav Shatz 2026-10-14 06:08:55 Re: Removing support for FE/BE protocol version 2
Previous Message Tatsuo Ishii 2026-10-14 01:04:40 Re: Fix SQLSTATE for Bind referencing a nonexistent prepared statement