Re: postgresql 12 runs out of memory when updating a partitioned table with subquery - Mailing list pgsql-bugs

From David Rowley
Subject Re: postgresql 12 runs out of memory when updating a partitioned table with subquery
Date
Msg-id CAApHDvot4+RtZFMsBEc4JtMW4xd17fQOS-d_qmJ4Cm37jbFYog@mail.gmail.com
Whole thread Raw
In response to Re: postgresql 12 runs out of memory when updating a partitioned table with subquery  (Max Vikharev <bm.kinder@gmail.com>)
List pgsql-bugs
On Mon, 13 Jul 2020 at 00:05, Max Vikharev <bm.kinder@gmail.com> wrote:
> It is very sad that postgresql can be killed with such a small amount of partitions.
> Looks like partitioning by project is not an option for my case (query is generated by Django ORM, there are many
others).
> I'll use indexing.

FWIW, this is part of the planner that there is work-in-progress to
improve. However, that's not going to appear until at least PG14.

The reason that PG12's planner is so slow and uses so much memory here
is that it's planning that subquery once for each partition.

David



pgsql-bugs by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: BUG #16500: SQL Abend. select multi_key_columns_range_partition_table
Next
From: PG Bug reporting form
Date:
Subject: BUG #16536: Segfault with partition-wise joins