Re: Significant performance issues with array_agg() + HashAggregate plans on Postgres 17

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Scott Carey <scott.carey@algonomy.com>, David Rowley <dgrowleyml@gmail.com>, pgsql-performance@lists.postgresql.org
Date: 2026-04-03T20:01:38Z
Lists: pgsql-performance
On Fri, 2026-04-03 at 15:56 -0400, Tom Lane wrote:
> Would it make sense to accumulate those values in a separate field
> child_mem_allocated, rather than redefining what mem_allocated
> means?

I think so unless we can't afford the new field for some reason. It
would be convenient to have the single-context-total available when
deleting the context.

I'll try a quick patch. I'll need to be sure that we can properly
decrement the total in all paths.

Regards,
	Jeff Davis




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Disk-based Hash Aggregation.