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 1r6ONW-000jrF-EO for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 05:05:23 +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 1r6ONV-007qZ8-3k for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 05:05:21 +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 1r6ONU-007qYz-LZ for pgsql-hackers@lists.postgresql.org; Fri, 24 Nov 2023 05:05:20 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6ONR-008EcT-Q3 for pgsql-hackers@postgresql.org; Fri, 24 Nov 2023 05:05:20 +0000 Received: from [192.168.43.178] (unknown [176.59.170.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.rybakina@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 7B1ACE21045; Fri, 24 Nov 2023 08:05:15 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1700802316; bh=QtSy8tBJjEPuhpzBAXcP+ZJzLNAqXBJb08IoYrgww0g=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=fAzgWC2wo0SDX9A3dCOeV2AQ62gLyvYAp3h3GtbYm2AejQyhgjg0F2R6fmOHQs3yL Cel+qgUv9iMK971JqpFLKoK2PJQoZE3n2GdI32qBugiGJHR9WHtLXjACT0L7mzlya5 tao+/URiHxRFmaw7xpWbKhXMK1omNM8s2iBa9mQW27gVjo+BqUNWyAt85q+pmGT1zJ DYJ7prxXS6EWqY2ZUw+kK/GpLEYckbKupKzzmmPUXrGvXJ/aE9wXfnSwqe9Ot3E1uH jgxoRPnvAvIm1jLp2t2KObQ1zaKDopkHZn789hKHKFrEBwxIFY2FbZB4UNFubPisQ1 q1pezjZPxC5LA== Message-ID: Date: Fri, 24 Nov 2023 08:05:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes To: Andrei Lepikhov , pgsql-hackers@postgresql.org Cc: Peter Geoghegan , Robert Haas , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Ranier Vilela , Tomas Vondra , Peter Eisentraut , Alexander Korotkov References: <567ED6CA.2040504@sigaev.ru> <89fb769c-7d45-f0c5-a9b3-b706c9661c57@postgrespro.ru> <668892c1-fb11-3a79-ce5e-1c194b7b3263@postgrespro.ru> <16a7e3aa-24c0-4986-8820-ea2857bd7b6b@postgrespro.ru> <421656a9-5df7-41bb-9d58-1c1edbd5dc3e@postgrespro.ru> <28c727ba-5260-42a8-88b0-4ecdeeca6ef8@postgrespro.ru> <4c1c2c0b-802f-45ae-a7cd-007bfd8957cf@postgrespro.ru> <52f0d302-7963-452f-8c5a-f66d261514eb@postgrespro.ru> <43ad8a48-b980-410d-a83c-5beebf82a4ed@postgrespro.ru> Content-Language: en-US From: Alena Rybakina In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23.11.2023 12:23, Andrei Lepikhov wrote: > I think the usage of nodeToString for the generation of clause hash is > too expensive and buggy. > Also, in the code, you didn't resolve hash collisions. So, I've > rewritten the patch a bit (see the attachment). > One more thing: I propose to enable transformation by default at least > for quick detection of possible issues. > This code changes tests in many places. But, as I see it, it mostly > demonstrates the positive effect of the transformation. On 24.11.2023 06:30, Andrei Lepikhov wrote: > On 23/11/2023 16:23, Andrei Lepikhov wrote: >> This code changes tests in many places. But, as I see it, it mostly >> demonstrates the positive effect of the transformation. > > I found out that the postgres_fdw tests were impacted by the feature. > Fix it, because the patch is on the commitfest and passes buildfarm. > Taking advantage of this, I suppressed the expression evaluation > procedure to make regression test changes more clear. Thank you for your work. You are right, the patch with the current changes looks better and works more correctly. To be honest, I didn't think we could use JumbleExpr in this way. -- Regards, Alena Rybakina Postgres Professional