Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSmdA-0003DK-PB for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jun 2018 16:58:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSmd9-0000zj-9m for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jun 2018 16:58:51 +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 1fSmd9-0000za-2q for pgsql-hackers@lists.postgresql.org; Tue, 12 Jun 2018 16:58:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSmd6-0002Wk-4X for pgsql-hackers@lists.postgresql.org; Tue, 12 Jun 2018 16:58:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w5CGwgdn031315; Tue, 12 Jun 2018 12:58:42 -0400 From: Tom Lane To: Robert Haas cc: David Rowley , Amit Langote , Dmitry Dolgov <9erthalion6@gmail.com>, Jeff Janes , Ashutosh Bapat , Pavel Stehule , PostgreSQL Hackers Subject: Re: why partition pruning doesn't work? In-reply-to: References: <7142.1527868419@sss.pgh.pa.us> <1111.1527977170@sss.pgh.pa.us> <10432.1528045900@sss.pgh.pa.us> <569483c5-a273-6537-1b5d-7a271ce439fb@lab.ntt.co.jp> <22805.1528386192@sss.pgh.pa.us> <21787.1528428171@sss.pgh.pa.us> <12624.1528578026@! sss.pgh.pa.us> <26279.1528670981@sss.pgh.pa.us> <17850.1528755844@sss.pgh.pa.us> <19365.1528820758@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 12 Jun 2018 12:40:28 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31313.1528822722.1@sss.pgh.pa.us> Date: Tue, 12 Jun 2018 12:58:42 -0400 Message-ID: <31314.1528822722@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > And there is > code in RelationClearRelation to avoid changing rd_partkey and > rd_partdesc if no logical change has occurred. Oh, and by the way, what's actually in there is keep_partkey = (relation->rd_partkey != NULL); I would be interested to see an explanation of why that isn't utterly broken. regards, tom lane