Re: BUG #17561: Server crashes on executing row() with very long argument list - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17561: Server crashes on executing row() with very long argument list
Date
Msg-id 3753050.1659102953@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17561: Server crashes on executing row() with very long argument list  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: BUG #17561: Server crashes on executing row() with very long argument list  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #17561: Server crashes on executing row() with very long argument list  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2022-Jul-29, PG Bug reporting form wrote:
>> When executing the following query:
>> (echo "SELECT row("; for ((i=1;i<100001;i++)); do echo "'$i',$i,"; done;
>> echo "'0',0);"; ) | psql
>> I got server crash with the following backtrace

> Hah, of course.  I suppose we'd need something like this ... haven't
> looked for other problem spots.

I think the parser should've prevented this.  It's in charge of
rejecting overlength SELECT lists, for example.  Also, the limit
probably needs to be just MaxTupleAttributeNumber.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: Excessive number of replication slots for 12->14 logical replication
Next
From: Tom Lane
Date:
Subject: Re: BUG #17561: Server crashes on executing row() with very long argument list