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 1tGipB-000IYU-WE for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Nov 2024 18:01:10 +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 1tGio9-000Iut-PB for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Nov 2024 18:00:06 +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 1tGio9-000Iuk-EL for pgsql-hackers@lists.postgresql.org; Thu, 28 Nov 2024 18:00:06 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGio7-0000nz-Qz for pgsql-hackers@postgresql.org; Thu, 28 Nov 2024 18:00:06 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-53df1e063d8so1347048e87.3 for ; Thu, 28 Nov 2024 10:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732816803; x=1733421603; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CR9N06T+a1Dn0CO4UDVzr3Dq/KmHnmH1FqGovEfHzxM=; b=JVEEI58r5LnewPaHFdxutPoZwckNvgikYW1u3ipuaz0OxSocrZjqDzmeaPduc5uC/J kRysGywm7LVmocSmtUqJGNa6TeU/zRk2Ws1KXTduA1zh5EWXkVUppFrmCsqnyS88S7aW UencingdLzGmSFXHhyTVZxDclUsEzdeYUHh+Y6eNYBvxKBe5Pm/RuJkCFGxKbCGiEqwb ALdaPFheYnxVdNYV1HN0BAsUt9XqhiI7KrkisMpE4zdBnTbZP8GwshIpc5m86mj2vH5n OX37bCkV2vPTQRGP8b4Z7O67Q5W0EALvagaZQ1+wlJx3D7yofhqP2SXbQcU27zIPk0id xsMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732816803; x=1733421603; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CR9N06T+a1Dn0CO4UDVzr3Dq/KmHnmH1FqGovEfHzxM=; b=ptYVghct7dMU6p+iFaiSbGSwUd60qh3CSGdcVeFQ2YiZoITjXh+5y7avCm1x9WX4qV sZIbBF+nosYwJ2k4M9uWg0J35uXmiIfLxumIKpiHZv9pKdrfRVG/HHbJs/0DdCTXrICU DlpJig8D85pQe0JKMQ13mbwBKIua2pPBr5TKImrRajinCuxLyfQ0BjQlpwlzclpFXlCl XRQxFU0lKTGeQ7qrGDjmYfP+qsnXFFRWUwKHwotACzH9b70EhRUUL7Sq6H6WSlOgSphA XBspY3tLgNv0ztXwLz/MiNVSRIhCTgfyBDUdOHsaYKOudodbloYT5cYhCSytyoIHHPrH 9Jpg== X-Forwarded-Encrypted: i=1; AJvYcCW6DOlOzcNS73kIMTh0MNzVobqkfOXoMVL0hwI44SWM5VlgKejLIyvTXfDCPo/pi3rA+l6uvTeBm0057M94@postgresql.org X-Gm-Message-State: AOJu0Ywh+/bDJyzKCfv/kSeF9HrdJf2OyoYq3kY5yRoODMnpL6ydi/vq +lo7iHhis8jRX7CNTYlDWmrbaDdfK4KXu444a75zCbqeU8G90xdl X-Gm-Gg: ASbGncvy5dSP35ZIqt/qReii/UNN0l5ZmPy5vlA1Efriw2QWe1GR+mwwDUXbShDVw4I yYBMDNvqdKiyjnziE9kIEyZkQrjFxV02ivSZLuBxz95AYCFQOg6q5b8uGFkQ9urdkU70P0P4ti+ Qw3VuY9hdH+HjHD10hKFFTHo0n+1CIjGeJyk0XdbQ/ikQo/LK6tf7xP9LY5PxJc/X8PCybxR8Lf 594Uc/pHMfyl4/x2715LFKrGG96niBlgKkVlZAVE2jdejs= X-Google-Smtp-Source: AGHT+IG50ksmBNpUTpDmW8cdTA0YYLfCI4KIj92ROTZ7gyIz5KsJ1P8X15pSq+ZgGfO7cbTwwMZk9g== X-Received: by 2002:a05:6512:33c8:b0:539:e97c:cb10 with SMTP id 2adb3069b0e04-53df00ffe50mr4673923e87.40.1732816803061; Thu, 28 Nov 2024 10:00:03 -0800 (PST) Received: from [1.0.0.7] ([178.155.16.116]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53df6430e74sm242802e87.9.2024.11.28.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Nov 2024 10:00:02 -0800 (PST) Message-ID: <8174de69-9e1a-0827-0e81-ef97f56a5939@gmail.com> Date: Thu, 28 Nov 2024 21:00:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US To: Alexander Korotkov , Andrei Lepikhov Cc: jian he , Robert Haas , Nikolay Shaplov , pgsql-hackers@lists.postgresql.org, pgsql-hackers@postgresql.org, Peter Geoghegan , Marcos Pegoraro , teodor@sigaev.ru, Peter Eisentraut , Ranier Vilela , Alena Rybakina References: <567ED6CA.2040504@sigaev.ru> <9ac6480d-6686-4c3a-9149-ba66df4f88ad@gmail.com> <45050ba9-3777-4cc1-89ad-a02deebe7729@gmail.com> <0026f562-d403-4f97-b9dc-3fe3a279e8c9@postgrespro.ru> <37bf870a-22e0-4aba-b845-549482118f8d@gmail.com> From: Alexander Lakhin 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 Hello Alexander, 21.11.2024 09:34, Alexander Korotkov wrote: > I'm going to push this if no objections. Please look at the following query, which triggers an error after ae4569161: SET random_page_cost = 1; CREATE TABLE tbl(u UUID); CREATE INDEX idx ON tbl USING HASH (u); SELECT COUNT(*) FROM tbl WHERE u = '00000000000000000000000000000000' OR   u = '11111111111111111111111111111111'; ERROR:  XX000: ScalarArrayOpExpr index qual found where not allowed LOCATION:  ExecIndexBuildScanKeys, nodeIndexscan.c:1625 Best regards, Alexander