Re: Partition Pruning (Hash Partitions) Support for DELETEs in PostgreSQL 11 and 12

From: Ronnie S <ronniesan967(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Partition Pruning (Hash Partitions) Support for DELETEs in PostgreSQL 11 and 12
Date: 2020-03-23 14:18:27
Message-ID: CAG89ABjMjqJRBEtvDw+PmgTpEbkKXsoPj+pNyO9RMmDXBWbzQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thanks!

On Mon, Mar 23, 2020 at 12:10 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:

> 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
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2020-03-23 16:16:31 Re: JOIN on partitions is very slow
Previous Message daya airody 2020-03-23 07:40:19 Re: JOIN on partitions is very slow