pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Dave E Martin <postgresql2-to.dave@dave.to>
Cc: pgsql-performance@postgresql.org
Subject: Re: DELETE / UPDATE from partition not optimized (11.0)
Date: Fri, 26 Oct 2018 10:45:40 -0500
Message-ID: <20181026154540.GA27004@telsasoft.com> (raw)
In-Reply-To: <CAFpvjbE3bETEC476aWVbEYu+eyQj5S5Mjo0+F673ck_Jrp6WHA@mail.gmail.com>
References: <CAFpvjbE3bETEC476aWVbEYu+eyQj5S5Mjo0+F673ck_Jrp6WHA@mail.gmail.com>

On Thu, Oct 25, 2018 at 10:43:10AM -0600, Dave E Martin wrote:
> If SELECT is confident enough to limit itself to one partition, why isn't
> DELETE (or UPDATE)?

Because of this limitation:

https://www.postgresql.org/docs/current/static/ddl-partitioning.html#DDL-PARTITION-PRUNING
|Currently, pruning of partitions during the planning of an UPDATE or DELETE
|command is implemented using the constraint exclusion method (however, it is
|controlled by the enable_partition_pruning rather than constraint_exclusion) —
|see the following section for details and caveats that apply.

Justin




view thread (3+ messages)  latest in thread

Message-ID: <20181026154540.GA27004@telsasoft.com>
Permalink:  ../20181026154540.GA27004@telsasoft.com/
Also on:    postgresql.org/message-id/20181026154540.GA27004@telsasoft.com

 · 

reply

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-performance@postgresql.org
  Cc: pryzby@telsasoft.com, postgresql2-to.dave@dave.to
  Subject: Re: DELETE / UPDATE from partition not optimized (11.0)
  In-Reply-To: <20181026154540.GA27004@telsasoft.com>

* 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