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 1vE8b1-0062rW-Ms for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 16:00:22 +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 1vE8b0-0024jw-JJ for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 16:00: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 1vE8b0-0024jo-BJ for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 16:00:21 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vE8ax-004uTA-0F for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 16:00:21 +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 59TG0DHf2754300; Wed, 29 Oct 2025 12:00:13 -0400 From: Tom Lane To: Richard Guo cc: Lori Corbani , Thomas Munro , "pgsql-bugs@lists.postgresql.org" Subject: Re: [EXTERNAL]Re: BUG #19094: select statement on postgres 17 vs postgres 18 is returning different/duplicate results In-reply-to: References: <19094-6ed410eb5b256abd@postgresql.org> <1970841.1761402665@sss.pgh.pa.us> <2441795.1761593103@sss.pgh.pa.us> <2447089.1761595976@sss.pgh.pa.us> <2485781.1761617055@sss.pgh.pa.us> <2626296.1761692854@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Wed, 29 Oct 2025 15:45:09 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2754298.1761753613.1@sss.pgh.pa.us> Date: Wed, 29 Oct 2025 12:00:13 -0400 Message-ID: <2754299.1761753613@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > After spending a bit more time experimenting, I couldn't find a better > query that shows a large difference between the costs of the PRSJ plan > and the patched version plan. So I've updated the test case to use > the aforementioned one. I also removed the reset statements and > switched to the begin/rollback pattern for the test case. v2 patch LGTM. regards, tom lane