From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
Date: Mon, 14 Jul 2025 19:17:47 -0400
Message-ID: <799185.1752535067@sss.pgh.pa.us> (raw)
In-Reply-To: <715434.1752521761@sss.pgh.pa.us>
References: <18984-0f4778a6599ac3ae@postgresql.org>
<715434.1752521761@sss.pgh.pa.us>
I 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.
I think I fat-fingered something, because now I can only reproduce back
to v13. Bisecting says the crash started at the v13-era commit
commit 2f9661311b83dc481fc19f6e3bda015392010a40
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Mon Mar 2 18:19:51 2020 -0300
Represent command completion tags as structs
which is unsurprising because that's what introduced the
Assert we're hitting.
BTW, with Asserts disabled it works fine:
$ psql postgres
psql (19devel)
Type "help" for help.
postgres=# \parse s
postgres=# execute s;
EXECUTE
which is another reason not to start throwing an error.
(I did not look into how come that works... the correct
command tag must be getting filled in later, but where?)
regards, tom lane
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: tgl@sss.pgh.pa.us, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
In-Reply-To: <799185.1752535067@sss.pgh.pa.us>
* 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