Re: Partition Pruning (Hash Partitions) Support for DELETEs inPostgreSQL 11 and 12 - Mailing list pgsql-performance

From Justin Pryzby
Subject Re: Partition Pruning (Hash Partitions) Support for DELETEs inPostgreSQL 11 and 12
Date
Msg-id 20200323041041.GH2563@telsasoft.com
Whole thread Raw
In response to Partition Pruning (Hash Partitions) Support for DELETEs in PostgreSQL11 and 12  (Ronnie S <ronniesan967@gmail.com>)
Responses Re: Partition Pruning (Hash Partitions) Support for DELETEs inPostgreSQL 11 and 12  (Ronnie S <ronniesan967@gmail.com>)
List pgsql-performance
On Sun, Mar 22, 2020 at 11:45:53PM -0400, Ronnie S wrote:
> Hello All,
> 
> While doing some tests with hash partitioning behavior in PG11 and 12, I
> have found that PG11 is not performing partition pruning with DELETEs
> (explain analyze returned >2000 lines). I then ran the same test in PG12
> and recreated the objects using the same DDL, and it worked

> Is this a bug, somewhat related to MergeAppend?
> https://github.com/postgres/postgres/commit/5220bb7533f9891b1e071da6461d5c387e8f7b09

> If it is, anyone know if we have a workaround for DELETEs to use hash
> partitions in PG11?

I think due to this commit to pg12:
https://commitfest.postgresql.org/22/1778/
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=428b260f87e8861ba8e58807b69d433db491c4f4
...
https://www.postgresql.org/message-id/5c83dbca-12b5-1acf-0e85-58299e464a26%40lab.ntt.co.jp
https://www.postgresql.org/message-id/4f049572-9440-3c99-afa1-f7ca7f38fe80%40lab.ntt.co.jp

-- 
Justin



pgsql-performance by date:

Previous
From: Ronnie S
Date:
Subject: Partition Pruning (Hash Partitions) Support for DELETEs in PostgreSQL11 and 12
Next
From: daya airody
Date:
Subject: Re: JOIN on partitions is very slow