Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-07-15T03:54:46Z
Lists: pgsql-bugs
On Mon, Jul 14, 2025 at 03:36:01PM -0400, Tom Lane wrote:
> BTW, d55322b0d simply made it easy to trigger the bug from psql.
> If I use current psql to connect to older servers, I can demonstrate
> crashes (or sometimes "stack depth limit exceeded") back to v12.
> Pre-v12 is immune because it just returns a command tag of EXECUTE
> regardless of what is in the prepared statement.

Oh.  It's pretty cool to see that these new meta-commands are able to
find such problems more easily.  That was one of the reasons to have
them in v18.
--
Michael

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Minor cosmetic tweaks

  2. Simplify coding in ProcessQuery

  3. Remove assertion from PortalRunMulti

  4. Represent command completion tags as structs