Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtKHP-00BxaN-Tx for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Oct 2023 04:05:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtKHN-00CWYj-0X for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Oct 2023 04:05:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtKHM-00CWYM-Io for pgsql-hackers@lists.postgresql.org; Thu, 19 Oct 2023 04:05:01 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtKHJ-001TPm-16 for pgsql-hackers@lists.postgresql.org; Thu, 19 Oct 2023 04:05:00 +0000 Received: from [10.10.20.69] (node-ptl.pool-101-109.dynamic.totinternet.net [101.109.130.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.lepikhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 3EBFFE203C9; Thu, 19 Oct 2023 07:04:54 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1697688297; bh=BTqSPjUI+sElZ6g0sE5qQxGyYARwrgmd1jkTBtY4Bpo=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=TzkAjbAzXRaRbNe1mi9vG+YMTrypEUABmwUtmWBitw6xuUt2nPYSWQhMKUe3KVmzB tjF+yk9Mlc/GeMc9nMkejf6okbGOwDlCpeNsgFpGE/d9yDpPw/s7pCgNc1adLMNyIA nV7hi+RZB8OyNo3WMTS8ctZgxcVTXAoBtz8eEA1Bb2yOyViJ0gTGxtqhRZ0MZL5ZjR 3qZ3bHKz1/HpscyFNoc+GWq4ZTtxN5wl5hkfSSdT0MwIEex/QKIkDeEbv+OdM5hofF ygub0dis7BlEc85mlA3J1WPMGH6Y+I94BJYME8Yi5L6wSg31Pio9tn9Ebgvy1RX2kv wlFuoCPbnO57Q== Message-ID: <9b066451-8f83-4f82-aeb2-bfcb5928cb41@postgrespro.ru> Date: Thu, 19 Oct 2023 11:04:52 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Asymmetric partition-wise JOIN Content-Language: en-US To: Ashutosh Bapat Cc: Alexander Korotkov , Alexander Pyhalov , Jaime Casanova , Aleksander Alekseev , pgsql-hackers@lists.postgresql.org, KaiGai Kohei , "a.rybakina" , =?UTF-8?B?0JHQtdC70Y/Qu9C+0LIg0JTQsNC80LjRgCDQndCw0LjQu9C10LLQuNGH?= References: <163118104689.1167.8241611097516113795.pgcf@coridan.postgresql.org> <20210909153833.GA6514@ahch-to> <2c9caede-55c0-2042-e421-dd0021f28837@postgrespro.ru> <792d60f4-37bc-e6ad-68ca-c2af5cbb2d9b@postgrespro.ru> <88bc3c051d285653215393a56bdf3056@postgrespro.ru> <5c0e38e3-7ab5-4b10-a1bb-70ca69771ff0@postgrespro.ru> <521c2a71-49dd-4ab5-a585-569d0af3a647@postgrespro.ru> From: Andrei Lepikhov Organization: Postgres Professional In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18/10/2023 16:59, Ashutosh Bapat wrote: > On Wed, Oct 18, 2023 at 10:55 AM Andrei Lepikhov > wrote: >> >>> But the clauses of A parameterized by P will produce different >>> translations for each of the partitions. I think we will need >>> different RelOptInfos (for A) to store these translations. >> >> Does the answer above resolved this issue? > > May be. There are other problematic areas like EvalPlanQual, Rescans, > reparameterised paths which can blow up if we use the same RelOptInfo > for different scans of the same relation. It will be good to test Yeah, now I got it. It is already the second place where I see some reference to a kind of hidden rule that the rte entry (or RelOptInfo) must correspond to only one plan node. I don't have a quick answer for now - maybe it is a kind of architectural agreement - and I will consider this issue during the development. > those. And also A need not be a simple relation; it could be join as > well. For a join RelOptInfo, as well as for any subtree, we have the same logic: the pathlist of this subtree is already formed during the previous level of the search and will not be changed. >> >>> The relid is also used to track the scans at executor level. Since we >>> have so many scans on A, each may be using different plan, we will >>> need different ids for those. >> >> I don't understand this sentence. Which way executor uses this index of >> RelOptInfo ? > > See Scan::scanrelid > -- regards, Andrey Lepikhov Postgres Professional