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 1l6SDq-0002O3-FE for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Feb 2021 05:58:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6SDp-0007p6-2T for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Feb 2021 05:58:01 +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 1l6SDo-0007oy-Rg for pgsql-hackers@lists.postgresql.org; Mon, 01 Feb 2021 05:58:00 +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 1l6SDm-0000gm-VO for pgsql-hackers@lists.postgresql.org; Mon, 01 Feb 2021 05:58:00 +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 1115vrlA3289346; Mon, 1 Feb 2021 00:57:53 -0500 From: Tom Lane To: David Rowley cc: Zhihong Yu , Andreas Seltenreich , PostgreSQL Developers Subject: Re: [sqlsmith] Failed assertion during partition pruning In-reply-to: <3288952.1612158537@sss.pgh.pa.us> References: <87sg8tqhsl.fsf@aurora.ydns.eu> <919903.1606603948@sss.pgh.pa.us> <1501458.1606854684@sss.pgh.pa.us> <2823553.1611952106@sss.pgh.pa.us> <2830051.1611960757@sss.pgh.pa.us> <3010978.1612046520@sss.pgh.pa.us> <3288952.1612158537@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 01 Feb 2021 00:48:57 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3289344.1612159073.1@sss.pgh.pa.us> Date: Mon, 01 Feb 2021 00:57:53 -0500 Message-ID: <3289345.1612159073@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > David Rowley writes: >> Parent RT indexes are guaranteed to be lower than their children RT >> indexes, > I was intentionally avoiding that assumption ;-). Maybe it buys enough > to be worth the loss of generality, but ... Oh, it's too late at night. I now remember that the real problem I had with that representation was that it cannot work for joinrels. Currently we only apply this logic to partitioned baserels, but don't you think it might someday be called on to optimize partitionwise joins? regards, tom lane