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 1vL8lJ-005Lyb-3C for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 23:35:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vL8lI-002g7g-1t for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 23:35:56 +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 1vL8lI-002g7Y-0w for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 23:35:56 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vL8lF-0004Fz-19 for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 23:35:55 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 4D3C6EC03C7; Mon, 17 Nov 2025 18:35:18 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 17 Nov 2025 18:35:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1763422518; x=1763508918; bh=GwuV51rx1k r9LYzi6mmSfk7eTolfJQlSvNXBRVZc3TY=; b=BBHEpdVoLBaJnW9LHvf/kn+2jL /YF6g4WA4tXJnvoW0hlnS2S0d2Rz7eTmGvk1nuTvyG7qtfEXxZssXErqXCIEcHs0 AkJk5m/hXSlypRhYgQfMlCjEarlh8Wopwn40DUOMubekonEiCweaAqGPk3C6CoX3 cYToOLiJRJJzBo+1nq38++csmuzb9XghZBiyiAmgEyQJmE39hN8VS4JrrDzzQZ77 TANGfa1gNek1iIn854Nalke3nZjjbJv0QRhXexwlPrcd6eQMkYQM+oj1M9dZZdh3 cNbiXbNEmhuKrIkJJRi7De82vJhBS2/X1MEFDPhDT+sWtEAbDBSQZK4WgyJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1763422518; x=1763508918; bh=GwuV51rx1kr9LYzi6mmSfk7eTolfJQlSvNX BRVZc3TY=; b=pQ0NQ/FYkSBfgPOcwe7fH+oXG1txXDsS0hPGNaP0z1UVE02Jkao V5Ox6gPBr+3MTexhUDEP1kYa9o+xk62yWZpT/vBCnRfgBEKi7kc1IVUq8wDeiNMX JrCCa1ImbpHssxuW4bdD5+p/TCzOGe6xvsReqIRidoxgIApT+Ol0VmWzTIHzDqWf vdsHjGRzqAKuvlzJg8J7ykWibiiiW7H+SLrrcwujhZCNnTwsrOgXJ631l3Jtlgbs eR6ZwBcbNTPY2ZQN0WknDdz+UjjeDqrmpHe3N71XbuORC+54OfbBkY6PxDXHjaKE nGWERxQD7OjrmHz84ki8bQiWyupq2aen63w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvudeljeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhirg hnrdhunhhivhgvrhhsrghlihhthiesghhmrghilhdrtghomhdprhgtphhtthhopegtohhr vgihrdhhuhhinhhkvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhomhgrshesvh honhgurhgrrdhmvgdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrd hprgdruhhs X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Nov 2025 18:35:16 -0500 (EST) Date: Tue, 18 Nov 2025 08:35:00 +0900 From: Michael Paquier To: jian he Cc: Corey Huinker , Tomas Vondra , pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us Subject: Re: Extended Statistics set/restore/clear functions. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8b0pjvqlUMmwzi5j" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --8b0pjvqlUMmwzi5j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2025 at 08:53:35PM +0800, jian he wrote: > segfault: > SELECT '[{"attributes" : [1,2,3,4,5,67,6,7,8], "ndistinct" : 4}]'::pg_ndi= stinct; >=20 > because src/backend/statistics/mvdistinct.c line: 310, Assert > Assert((item->nattributes >=3D 2) && (item->nattributes <=3D STATS_MAX_DI= MENSIONS)); Ahah, good one here. Perhaps we had better switch this assertion to become an elog() with the import functions in mind, as well. It may be worth double-checking the other deserialization paths, as well. We need to be super careful about this stuff for data imports. -- Michael --8b0pjvqlUMmwzi5j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmkbsSQACgkQnvQgOdby QH3/HA//ZiXr00XXAK2uBtAt3Pjb19aJa7GdyQqR2lXz7SxqX2jIhjxVtTAcAzHE YII0228ulqmMdaYQ39umypnikqjd8PmoPhSeLpGXeOyj3Vhgws7Pd6p0YpP4KxF9 1XKQnTh86lNzFomMPhlPQWMnMOL+1y8lw8x8UjKrMwJpdElNbQLkpBF1A4r9RXNZ J8ZcV1OsKrCy5xEHOpQX0TX6wGtZi+DxpzMiWUYkgOcYbc0zttsUKjWy4sXLPT6P ap2m/G8wbVJm1YM0GcFzGmvrBMsk8J6GrjXql8fnrPDpTGbBz1eaZlB+ImmdU/WY NhNCZ/MHA6kMGtA1chqGSBeacLZ+zlh3Xfr1NTk8auSXmqFlVVkC89HCnAigM55I rEZ81vEArGdayxzDJnoBwJJU+cT44h9DGYPqYAEa9IVqUvSWK9N+uxkeUmAczq7O V4oDmJV1AD3iw8PyHusiGW6mIXt0d+jjz9j2g4JFDWuKSkPxmyJBcXlE/j+ZT/um bKQupM1qISX7MFoAv1KqQNGbZmCoiQ95EQ9JBEhvLb/g+USyc8sGz6YmZf0Gn3BO N2a8J1IoB8V/adXYZgk9mNnUS6WYewSmCN9e6gaRZ+XGvd/5PYqTpf7AIw6E/7DQ ODtVmDXYTTtnupRMKeZAu8v38albucQDXv4rJcochQ9oxBFT7QE= =VGFL -----END PGP SIGNATURE----- --8b0pjvqlUMmwzi5j--