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

From Richard Guo
Subject Re: Re[2]: BUG #17561: Server crashes on executing row() with very long argument list
Date
Msg-id CAMbWs48GiU-qucoJwH-p0pUY0OnrxZPXQjv7+HGzEPv6D18Vpg@mail.gmail.com
Whole thread Raw
In response to Re[2]: BUG #17561: Server crashes on executing row() with very long argument list  (Егор Чиндяскин <kyzevan23@mail.ru>)
Responses Re: Re[2]: BUG #17561: Server crashes on executing row() with very long argument list
List pgsql-bugs

On Mon, Aug 1, 2022 at 3:17 PM Егор Чиндяскин <kyzevan23@mail.ru> wrote:
Thank you, Tom! The fix works for that case, but there is another one.
I got server crashed while executing the following script: 
 
(echo "SELECT * FROM json_to_record('{\"0\":0 ";for((i=1;i<100001;i++));do echo ",\"$i\":$i";done; echo "}') as x("; echo "\"0\" int";for((i=1;i<100001;i++));do echo ",\"$i\" int";done;echo ")") | psql 

Thanks for the report! This is another place that we construct a tupdesc
with more than MaxAttrNumber attributes, via RangeFunctions this time.

Regarding the fix, how about we check the length of coldeflist against
MaxTupleAttributeNumber in transformRangeFunction()?

Thanks
Richard

pgsql-bugs by date:

Previous
From: Stanisław Skonieczny
Date:
Subject: Re: BUG #17560: Planner can not find plan with lowest cost
Next
From: Richard Guo
Date:
Subject: Re: Re[2]: BUG #17561: Server crashes on executing row() with very long argument list