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 1qBxpg-0004Yl-Ul for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2023 13:25:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qBxpd-00047b-Uf for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2023 13:25:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBxpd-00047A-Mn for pgsql-bugs@lists.postgresql.org; Wed, 21 Jun 2023 13:25:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qBxpb-003R4h-1N for pgsql-bugs@lists.postgresql.org; Wed, 21 Jun 2023 13:25:08 +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 35LDP1cb3754267; Wed, 21 Jun 2023 09:25:01 -0400 From: Tom Lane To: Zu-Ming Jiang cc: Tomas Vondra , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17986: Inconsistent results of SELECT affected by btree index In-reply-to: <5095c4dd-dcce-1af2-0be3-9fba11db6c96@inf.ethz.ch> References: <17986-6ebf8b5d2c3a4f6e@postgresql.org> <3689741.1687320665@sss.pgh.pa.us> <5095c4dd-dcce-1af2-0be3-9fba11db6c96@inf.ethz.ch> Comments: In-reply-to Zu-Ming Jiang message dated "Wed, 21 Jun 2023 09:22:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3754265.1687353901.1@sss.pgh.pa.us> Date: Wed, 21 Jun 2023 09:25:01 -0400 Message-ID: <3754266.1687353901@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Zu-Ming Jiang writes: > Thanks for your information! I checked it again. Seems this bug can be > reproduced when I used "quick-fix-for-bug-17985.patch" for bug 17985, > but cannot be reproduced after I used "better-fix-for-bug-17985.patch". > So it was fixed by the patch "better-fix-for-bug-17985.patch". Oh, that's very interesting. There must be some other code path in the executor that responds to the Hash node's allParams bit, and doesn't do the right thing unless it's set. Not totally surprising I guess; the quick-fix thing was definitely a hack. regards, tom lane