Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gG4J4-0006Er-Nl for pgsql-performance@arkaria.postgresql.org; Fri, 26 Oct 2018 15:45:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gG4J2-0001Ov-SE for pgsql-performance@arkaria.postgresql.org; Fri, 26 Oct 2018 15:45:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gG4J2-0001Oo-D1 for pgsql-performance@lists.postgresql.org; Fri, 26 Oct 2018 15:45:48 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gG4Iz-0007t5-70 for pgsql-performance@postgresql.org; Fri, 26 Oct 2018 15:45:48 +0000 Received: by mail-io1-xd43.google.com with SMTP id l25-v6so998479ioj.0 for ; Fri, 26 Oct 2018 08:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=xkfPRNWKJ10oVg/2m1UdgEPJXlZj+LA6qhFaeCOvvTo=; b=tNZ/f2rO/6Vai0kLm4ao4T3cKsu+5UwjtWkCCZG3ce59zRKv1ANMDBWkDjz9a4cZKf Lx9LkDDt28ZlSObZM3ePl/Tdhc8ZKL+ekKyaMNl1r7Quv8eo+riXE3EB1Z8qvjd45Ahv 9rRr1jfFvHpAcDwxSBcZgrFQsK3vqjHGoLlsMULbkWz10VrvvAOcVVEQexCQUuSJ0Xug qd3jkP3QfWy1+uFgCnVgM9ZRIGRkjCvpFi6liFgl/x6O5s/pNiEMR4xzTEzfQVpO9Bgb AP4jfWtc08ML2Zwn4vIYvVX8Pr4yxJdk0h8NLWNB9xHlWDKUxKCPu+NlaNZtZ5HQjjV7 1PsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xkfPRNWKJ10oVg/2m1UdgEPJXlZj+LA6qhFaeCOvvTo=; b=V5C+fCpYXxjl5KnFSXXZoCWZfHlEjJ0hzLtylWYskVjajA2fi36hLfSke/gARuX9en ccSNg5IAKphRPBlOU7gmRfGEtmqWMq6MIzSMPuZ1tqQXI0iTVWDnHTB7LlqNMqOD/eta 0++2f6iKTzKeO8O42zmzy9UPx/zEFMJbUTETWCwifEbNZKHla4eUQgH94wsrgyneG563 UOoHHFctQDOH5BO0dZC+5kjGI2pxmTXwbJujUvEsVBcj4fyUy3owuBMATiDswnb9551B WkHh/LbBKUXRFVYT0GsdKuSYmoyKytMoRiAkhj0y+peYOuAB6mMKBEorBHtkIc1fPP77 3Qzw== X-Gm-Message-State: AGRZ1gIqnrW5FdRPZ5YiS95R9h3nZMoL0k09a4xa4yQMsybeOQUo0hj1 71YLry2+T9G+TXxLwlv5/SW0JsRyEATO9g== X-Google-Smtp-Source: AJdET5dt8BpUT8MyE3oAMDGg+1aIOxfcepmqvKoQP5wiPQ6ENkZ9Q96ojHi+yqNgfWnOYr9Eh5Fpgw== X-Received: by 2002:a5e:da05:: with SMTP id x5-v6mr2591521ioj.81.1540568742757; Fri, 26 Oct 2018 08:45:42 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id q23-v6sm4389453ioj.68.2018.10.26.08.45.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 08:45:42 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id EE926804FC9; Fri, 26 Oct 2018 10:45:40 -0500 (CDT) Date: Fri, 26 Oct 2018 10:45:40 -0500 From: Justin Pryzby To: Dave E Martin Cc: pgsql-performance@postgresql.org Subject: Re: DELETE / UPDATE from partition not optimized (11.0) Message-ID: <20181026154540.GA27004@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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