Re: array_agg(DISTINCT) caused a segmentation fault

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, pgsql-bugs@lists.postgresql.org
Date: 2023-02-13T12:00:00Z
Lists: pgsql-bugs
13.02.2023 13:41, David Rowley wrote:
> On Mon, 13 Feb 2023 at 23:00, Alexander Lakhin <exclusion@gmail.com> wrote:
> ...
> Thanks for testing that.  I neglected to update the logic which pfrees
> the old Datum, which (as of 7da51590e) may now be NULL.
>
> I've just pushed a fix.
Thanks! The issue is not reproduced now.

Best regards,
Alexander



Commits

  1. Fix pfree issue in presorted DISTINCT aggregate code

  2. Fix incorrect presorted DISTINCT aggregate if condition