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 1w9nYz-001l49-1I for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2026 17:16:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9nYx-00AmUW-38 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2026 17:16:36 +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 1w9nYx-00AmUO-2K for pgsql-bugs@lists.postgresql.org; Mon, 06 Apr 2026 17:16:36 +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.98.2) (envelope-from ) id 1w9nYw-00000000t6U-1NRz for pgsql-bugs@lists.postgresql.org; Mon, 06 Apr 2026 17:16:35 +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 636HGV4G1443506; Mon, 6 Apr 2026 13:16:31 -0400 From: Tom Lane To: Dmytro Astapov cc: pgsql-bugs@lists.postgresql.org Subject: Re: array_agg(anyarray) silently produces corrupt results with parallel workers when inputs mix NULL and non-NULL array elements In-reply-to: References: <4102596.1775320901@sss.pgh.pa.us> Comments: In-reply-to Dmytro Astapov message dated "Mon, 06 Apr 2026 13:04:18 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1443504.1775495791.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 06 Apr 2026 13:16:31 -0400 Message-ID: <1443505.1775495791@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dmytro Astapov writes: > On Sat, Apr 4, 2026 at 5:41 PM Tom Lane wrote: >> So I end with the attached revised patch, where I also made one >> or two cosmetic adjustments like putting the type-comparison checks >> next to the dimension comparisons. Look good to you? > Looks good, thank you for improving it. Great, pushed then. Many thanks for the bug report and fix! regards, tom lane