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 1vLPzQ-00G7CF-20 for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Nov 2025 17:59:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vLPzP-007xWY-0o for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Nov 2025 17:59:39 +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 1vLPzO-007xWQ-3D for pgsql-bugs@lists.postgresql.org; Tue, 18 Nov 2025 17:59:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLPzN-000Cfe-04 for pgsql-bugs@lists.postgresql.org; Tue, 18 Nov 2025 17:59:38 +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 5AIHxYXQ1302817; Tue, 18 Nov 2025 12:59:34 -0500 From: Tom Lane To: Richard Guo cc: Vik Fearing , Kamil Monicz , pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #19106: Potential regression with CTE materialization planning in Postgres 18 In-reply-to: <3215004.1763142948@sss.pgh.pa.us> References: <19106-9dd3668a0734cd72@postgresql.org> <1650412.1762703636@sss.pgh.pa.us> <1886977.1762794560@sss.pgh.pa.us> <1980046.1762808758@sss.pgh.pa.us> <36c1f631-f65f-4bb8-90af-9fafdb683547@postgresfriends.org> <2184532.1762874669@sss.pgh.pa.us> <2226630.1762892879@sss.pgh.pa.us> <2394348.1762975973@sss.pgh.pa.us> <3215004.1763142948@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 14 Nov 2025 12:55:48 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1302815.1763488774.1@sss.pgh.pa.us> Date: Tue, 18 Nov 2025 12:59:34 -0500 Message-ID: <1302816.1763488774@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > The more I think about this, the more I like the other idea of just > throwing an error rather than trying to fix up cases like bug #19055. > I don't think we have much evidence that anyone is trying to do that > in the real world (otherwise reports would have surfaced years ago). > And this discussion is making it clear that fixing it up is harder > than it sounds. Hearing no further comments, I've pushed the v2 patch that does it that way, restoring the previous behavior in cases that would not have failed before #19055. regards, tom lane