From: Tom Lane <tgl@sss.pgh.pa.us>
To: chjischj@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM.
Date: Tue, 12 Jul 2022 18:15:54 -0400
Message-ID: <1942040.1657664154@sss.pgh.pa.us> (raw)
In-Reply-To: <17548-4d206a94ee58f3a5@postgresql.org>
References: <17548-4d206a94ee58f3a5@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, chjischj@163.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17548: Aggregate queries on partitioned tables can cause OOM.
In-Reply-To: <1942040.1657664154@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox