Re: Error when using array_agg with filter where clause in pg16 and pg17

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kaimeh <kkaimeh(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Error when using array_agg with filter where clause in pg16 and pg17
Date: 2025-04-09 02:55:33
Message-ID: CAApHDvq_GHfoApjFHUZTMG46WPyX8anfBwdbz_cTTqodwnVH6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 9 Apr 2025 at 14:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > I'm not following why my in method if the planner chooses a poor plan
> > is any different from the planner choosing a poor plan for anything
> > else because the stats or costs aren't a good reflection of reality.
>
> Well, we hope we'll usually pick the right thing. But upthread
> you were complaining that any change might be a regression, or
> at least that's how I read it.

I'm mostly concerned about just a blanket disabling of the presorted
optimisation when the Aggref has a FILTER. I think that's what you
proposed at one point. I'm more happy to go with your first proposal
to try and figure out if the args are safe to sort before filtering.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2025-04-09 09:29:22 Re: BUG #18815: Logical replication worker Segmentation fault
Previous Message Tom Lane 2025-04-09 02:36:26 Re: Error when using array_agg with filter where clause in pg16 and pg17