Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault
От | Tender Wang |
---|---|
Тема | Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault |
Дата | |
Msg-id | CAHewXN=hHQepA9-JHaW9z-orPE-qA2UEFNvAvLpYZr6e1PGq2Q@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault (PG Bug reporting form <noreply@postgresql.org>) |
Список | pgsql-bugs |
Amit Langote <amitlangote09@gmail.com> 于2024年10月16日周三 17:06写道:
On Wed, Oct 16, 2024 at 5:20 PM Tender Wang <tndrwang@gmail.com> wrote:
> Amit Langote <amitlangote09@gmail.com> 于2024年10月16日周三 08:35写道:
>>
>> On Wed, Oct 16, 2024 at 9:19 AM Michael Paquier <michael@paquier.xyz> wrote:
>> > On Tue, Oct 15, 2024 at 11:00:01AM +0000, PG Bug reporting form wrote:
>> > > First bad commit for this anomaly is b6e1157e7.
>> >
>> > Amit, any thoughts?
>>
>> Will look into it, thanks.
> Hi,
>
> I debug this issue, and I find that:
> after b6e1157e7, we shouldn't walk JsonValueExpr.raw_expr in expression_tree_walker_impl(), which
> is called in preprocess_aggrefs().
>
> I try to above solution, no crashed again.
Thanks for the analysis. That is my conclusion as well.
Attached a patch.
Yeah, yours look more better than mine. And the typo in my attached patch, is that right?
JSON_OBJECT() should be JSON_OBJECTAGG() near transformJsonObjectAgg()
Thanks,
Tender Wang
В списке pgsql-bugs по дате отправления: