Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki2ng-00069s-Ma for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Nov 2020 21:58:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ki2nf-0005Mf-C0 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Nov 2020 21:58:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki2nf-0005MY-5u for pgsql-bugs@lists.postgresql.org; Wed, 25 Nov 2020 21:58:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki2nd-0002j0-0i for pgsql-bugs@lists.postgresql.org; Wed, 25 Nov 2020 21:58:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0APLw1Js572036; Wed, 25 Nov 2020 16:58:01 -0500 From: Tom Lane To: akattunga@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16745: delete does not prune partitions on declarative partitioned table In-reply-to: <16745-e765ee2879fea695@postgresql.org> References: <16745-e765ee2879fea695@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 25 Nov 2020 21:12:49 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <572034.1606341481.1@sss.pgh.pa.us> Date: Wed, 25 Nov 2020 16:58:01 -0500 Message-ID: <572035.1606341481@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > If I execute: > select * FROM FAC_ITEM WHERE FCODDIST='' AND FSUCURS=1 AND > FFECHAI=current_date; > it use only one partition > but: > delete FROM FAC_ITEM WHERE FCODDIST='' AND FSUCURS=1 AND > FFECHAI=current_date; > scan all partitions > Is there any regression? No. There's work afoot to improve this, but it wasn't any better before. regards, tom lane