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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: kyzevan23(at)mail(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17561: Server crashes on executing row() with very long argument list
Date: 2022-07-29 13:55:53
Message-ID: 3753050.1659102953@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-bugs by date

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