Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM.
Date
Msg-id 1942040.1657664154@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17548: Aggregate queries on partitioned tables can cause OOM.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: can't drop table due to reference from orphaned temp function
Next
From: Michael Paquier
Date:
Subject: Re: BUG #17543: CSVLOG malformed from disk space error