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.96) (envelope-from ) id 1vOXXb-00Bv1y-17 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Nov 2025 08:39:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOXXY-004jzE-2O for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Nov 2025 08:39:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vOXXY-004jz5-0v for pgsql-hackers@lists.postgresql.org; Thu, 27 Nov 2025 08:39:48 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vOXXU-001iMv-39 for pgsql-hackers@lists.postgresql.org; Thu, 27 Nov 2025 08:39:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1764232774; bh=oCSpf6beQmft3/WjHzchzKCGPU2dUAOk8+AzLTNw/jw=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=yAZhBBgxK8t2394o1BoLgibxFaXrcbY7zl0M4Wy6jzUJ+3hXA6pRdFfsNUcD7qlug iFRSKxV9FgC8GMHIytjm+WRvtNjOLPlXr/QVG0EPlN6+YpDIc9H5bwnHq/QT0bD9AQ LVzztJVM4+OIDheU2hxgkQXGdGpfjp3hPuLA4DwkWDDvSL/WzPGvnA770jYCMkSNi8 UwHIMuchbh40t722JPeJ2I36BSJstHqDVwJuGYBm3N5/9P6EXJph07GR759iwSf2Yh 8DRK5AtkT2vD0QEiCoFzGEb5ETG4dN5FzTzngSCqpZD27t+DhbRrQMRGQii4zBq+vs 0pfdeI75J6dzw== Received: from [192.168.1.41] (a96.sub49.net78.udm.net [78.85.49.96]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: s.glukhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/465) with ESMTPSA id AA13A6013F; Thu, 27 Nov 2025 11:39:34 +0300 (MSK) Message-ID: <7009dd30-5d4e-49a2-af1d-c1b5f8e02288@postgrespro.ru> Date: Thu, 27 Nov 2025 12:39:34 +0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Partial hash index is not used for implied qual. To: David Rowley , Tom Lane Cc: pgsql-hackers@lists.postgresql.org References: <1106189.1764033798@sss.pgh.pa.us> <1112416.1764036072@sss.pgh.pa.us> <1615744.1764181557@sss.pgh.pa.us> Content-Language: en-US From: Sergei Glukhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/11/27 05:25:00 #27979653 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 11/27/25 7:01 AM, David Rowley wrote: > On Thu, 27 Nov 2025 at 07:26, Tom Lane wrote: >> So I'm inclined to apply the attached and just call it good. > I think the patch looks fine. +1, verified, thanks a lot! > >> Should we back-patch? I'm unsure. Clearly it's a bug that we >> cannot generate an indexscan plan in this case, but we've learned >> that changing plans in released branches is often not wanted. >> And given the lack of field complaints, nobody is using the case >> anyway. > I feel like anyone adding a partial hash index has done so quite > purposefully. I suspect they might be surprised if there's no means > whatsoever to use that index in scans, so perhaps it's ok to > backpatch. > > Sergei, can you confirm if this was something he noticed when playing > around on master, or if this came from a field report? It was reported for v16. Regards, Sergei Glukhov