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 1u2LIm-00GdZM-FY for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Apr 2025 02:36:32 +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 1u2LIk-00HRv6-7e for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Apr 2025 02:36:30 +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 1u2LIj-00HRuy-Vq for pgsql-bugs@lists.postgresql.org; Wed, 09 Apr 2025 02:36:30 +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 1u2LIi-004FXE-0L for pgsql-bugs@lists.postgresql.org; Wed, 09 Apr 2025 02:36:29 +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 5392aQTA112034; Tue, 8 Apr 2025 22:36:26 -0400 From: Tom Lane To: David Rowley cc: Kaimeh , pgsql-bugs@lists.postgresql.org Subject: Re: Error when using array_agg with filter where clause in pg16 and pg17 In-reply-to: References: <4040920.1744126348@sss.pgh.pa.us> <90177.1744158354@sss.pgh.pa.us> <101611.1744159946@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Wed, 09 Apr 2025 13:50:48 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <112032.1744166186.1@sss.pgh.pa.us> Date: Tue, 08 Apr 2025 22:36:26 -0400 Message-ID: <112033.1744166186@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > I'm not following why my in method if the planner chooses a poor plan > is any different from the planner choosing a poor plan for anything > else because the stats or costs aren't a good reflection of reality. Well, we hope we'll usually pick the right thing. But upthread you were complaining that any change might be a regression, or at least that's how I read it. regards, tom lane