From: Tom Lane <tgl@sss.pgh.pa.us>
To: Duncan Sands <duncan.sands@deepbluecap.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Query planning on partitioned table causes postgres 13.4 to consume all memory
Date: Sun, 19 Sep 2021 12:03:04 -0400
Message-ID: <1556207.1632067384@sss.pgh.pa.us> (raw)
In-Reply-To: <4a3115d4-0fb2-e214-93e3-9a9d0974b883@deepbluecap.com>
References: <4a3115d4-0fb2-e214-93e3-9a9d0974b883@deepbluecap.com>
Duncan Sands <duncan.sands@deepbluecap.com> writes:
> [ planning DELETE on a thousand-partition table takes forever ]
FWIW, this situation has been very much improved for v14 [1].
In older branches, the best advice I can give you is "don't use
so many partitions". Especially not with hash partitioning,
where the query WHERE clause generally won't translate to any
useful pruning of the partitions.
(Personally, I think that hash partitioning is an evil that
we shouldn't have implemented at all. Or at least there
should be stronger warnings about it in the manual than there
are now.)
regards, tom lane
[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=86dc90056
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, duncan.sands@deepbluecap.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Query planning on partitioned table causes postgres 13.4 to consume all memory
In-Reply-To: <1556207.1632067384@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