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.98.2) (envelope-from ) id 1xQVH1-00000000Abh-3fZp for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Nov 2026 19:43:23 +0000 Received: from localhost ([127.0.0.1]:59254 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xQVGy-00000002NDG-1QJw for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Nov 2026 19:43:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:58638) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xQVGy-00000002ND8-0NNl for pgsql-bugs@lists.postgresql.org; Mon, 09 Nov 2026 19:43:20 +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 1xQVGw-0000000055j-45Wq for pgsql-bugs@lists.postgresql.org; Mon, 09 Nov 2026 19:43:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6A9JhFX92492771; Mon, 9 Nov 2026 14:43:15 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 sss.pgh.pa.us 6A9JhFX92492771 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sss.pgh.pa.us; s=default; t=1794253395; bh=/yrKSlZSYQF1RL5PVuU+0ro/KrM3Nw7ZNh2l5BHueFE=; h=From:To:cc:Subject:In-reply-to:References:Date:From; b=H+GnlnsuYFaR5KjqpAEiymPZFSS+C0thoboOohc7KF11JnuXv+0eArDEARJguKlS+ dEFuCIVdlbNFaSWspCaO0XGRN439H2sNdhZB9IExa/UzarxmaflYoxDdxB/EOlcheP /X9YTVBhnJKnR57WKmcasUTGymfZNlR1KxtiKxEU= From: Tom Lane To: Michael Paquier cc: shihao zhong , Atisss hh <125atishprak@gmail.com>, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19849: queries fail after ANALYZE with expression stats on arrays In-reply-to: References: <19849-38b8bd2fea807154@postgresql.org> Comments: In-reply-to Michael Paquier message dated "Mon, 09 Nov 2026 14:48:00 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2492769.1794253395.1@sss.pgh.pa.us> Date: Mon, 09 Nov 2026 14:43:15 -0500 Message-ID: <2492770.1794253395@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Mon, Nov 09, 2026 at 12:10:33AM -0500, shihao zhong wrote: >> 0001 is your fix plus the same change for stanumbers. Now >> serialize_expr_stats() matches update_attstats() again. Ugh. > Tom, any thoughts? I think it's unfortunate that we have two copies of largely the same code that have to be kept in sync. At the very least we ought to install comments warning of that in both places. But I wonder if it's practical to refactor so that there's just one copy? regards, tom lane