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 1m1Ezu-00062w-OM for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Jul 2021 21:22:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1Ezt-0004QX-Lv for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Jul 2021 21:22:21 +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 1m1Ezt-0004QO-EJ for pgsql-bugs@lists.postgresql.org; Wed, 07 Jul 2021 21:22:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Ezr-0006sD-Gj for pgsql-bugs@lists.postgresql.org; Wed, 07 Jul 2021 21:22:20 +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 167LMH8P1909847; Wed, 7 Jul 2021 17:22:17 -0400 From: Tom Lane To: Andrew Gierth cc: Michael Paquier , cyg0810@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17088: FailedAssertion in prepagg.c In-reply-to: <87a6mxrggq.fsf@news-spur.riddles.org.uk> References: <17088-e33882b387de7f5c@postgresql.org> <1908212.1625690962@sss.pgh.pa.us> <87a6mxrggq.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Wed, 07 Jul 2021 22:18:01 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1909845.1625692937.1@sss.pgh.pa.us> Date: Wed, 07 Jul 2021 17:22:17 -0400 Message-ID: <1909846.1625692937@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Gierth writes: > A number of places in the planner have to explicitly avoid recursing > into GroupingFunc->args when walking trees specifically because they are > not evaluated. It looks to me like some places where that should have > been checked for were missed. Looking into it. Hmm. Maybe it'd be better if the default behavior in expression_tree_walker/mutator did not include recursing into the args, then? I am thinking this might be comparable to SubLinks/SubPlans, where the walker has to take explicit action if it wants to recurse into the sub-query. regards, tom lane