Re: Query planning on partitioned table causes postgres 13.4 to consume all memory - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Query planning on partitioned table causes postgres 13.4 to consume all memory
Date
Msg-id 1556207.1632067384@sss.pgh.pa.us
Whole thread Raw
In response to Query planning on partitioned table causes postgres 13.4 to consume all memory  (Duncan Sands <duncan.sands@deepbluecap.com>)
Responses Re: Query planning on partitioned table causes postgres 13.4 to consume all memory  (Duncan Sands <duncan.sands@deepbluecap.com>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17195: Can't bind $1::int param when I use COPY TO STDOUT statement - libpq, C++
Next
From: Noah Misch
Date:
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data