Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault
Date: 2024-10-18 01:34:33
Message-ID: CAHewXNkcG=adJtfqHXuLnZrDAfSWPrX0GwLU98hYLjJbgZON1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 于2024年10月18日周五 04:30写道:

> Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> > On Thu, Oct 17, 2024 at 1:12 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> In the short term, I suspect the only workable fix is to undo the
> >> optimization of having ExecInitExprRec not recurse into both raw_expr
> >> and formatted_expr.
>
> > This or actually I'm tempted to simply revert the whole thing
> > (b6e1157e7d3) as an ill-considered refactoring, because I am not able
> > to convince myself that calling ExecAggPlainTransByVal() twice, via
> > both raw_expr and formatted_expr, is always safe.
>
> Not following the concern here? As far as nodeAgg is concerned,
> they'd be two independent aggregates.
>
> In any case, whatever we do in master, you can't "simply revert"
> b6e1157e7 in released branches. It changed the way JsonValueExpr is
> represented in stored rules, and you don't get to undo that midstream.
>

Sorry, I can't fully understand what you said above. What's the stored
rule?
And "you don't get to undo that midstream." What is the Scenario that we
get to undo?
Can you give more explanation? Thanks.

--
Thanks,
Tender Wang

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-10-18 01:46:45 Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault
Previous Message Andrei Lepikhov 2024-10-17 23:59:02 Re: Reference to - BUG #18349: ERROR: invalid DSA memory alloc request size 1811939328, CONTEXT: parallel worker