Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: chjischj(at)163(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM.
Date: 2022-07-12 22:15:54
Message-ID: 1942040.1657664154@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Aggregate queries on partitioned tables can cause out of memory error.

This is resolved in PG v13 and later. In older versions, it's
advisable to do an explicit ANALYZE on a large table, so that the
planner knows that the number of groups is large and will avoid
trying to do a hash aggregation.

(I don't think it's terribly specific to partitioned tables,
for what that's worth, except that stats for a partitioned
table might be more likely to be out-of-date.)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2022-07-13 00:26:13 Re: BUG #17543: CSVLOG malformed from disk space error
Previous Message Andres Freund 2022-07-12 19:24:54 Re: can't drop table due to reference from orphaned temp function