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 1w2FoU-0007zF-3A for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:49:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2FoT-00DSXZ-30 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:49:25 +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 1w2FoT-00DSXO-22 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:49:25 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2FoQ-0000000051s-22Kj for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:49:24 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 9DB8DEC0B34; Mon, 16 Mar 2026 17:49:23 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Mon, 16 Mar 2026 17:49:23 -0400 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=fm1; t=1773697763; x=1773784163; bh=uCXKFntJD6 V8l7Q1LrP2poWQqzkM4g7PnF1NvP8ZWD8=; b=lqJZg/yUg11v+/MO5XAD++XSxG 66156XwnHCt+iqOd5ktWdAYBpFKMJVbYgnmoxP+bdRnt7nJbU6CXA8qbykdP2YEt Ba8M4xWiYgb822GDrMRvlS723hVLmZRc02NT2ZPj1QScfDgHmIS25EkvTCDgcyK7 WHvSbzd1fpt/mBWGE0iWkyF6vwz0QjF0EUk27bDPvnubDJDXJnk28YYvT2sGC3jd JS6QCuYqzjJA88x8A1sLmAh0RgXXON3kf2Y8U+zXUS0YBo0lDa84VtQz3eI3rOF2 AFVeo+zB+AZ+aYKUY7mc637NHwcbqEJAT6dY0cffi5a5mdHQtNAXETJP8jQQ== 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=fm1; t= 1773697763; x=1773784163; bh=uCXKFntJD6V8l7Q1LrP2poWQqzkM4g7PnF1 NvP8ZWD8=; b=JxoMmsGPgDbeMbHHWEqKR6jxCUKYgGtEB8jicy0unEu6lP7+bE+ bPvb56lU4kOzNCd5URaHGdNa6E/wJBCeV1qGr1erKQgoW/k0Fknku3nbiaiqnTvt Qkq/pqaBO7bT6NNMRb1Vp4L95zYtIHO8Hhun+wFfQ5/hnHOfPO6+FzUqVmkg7RkJ HqG1rD/3FeBOc6XHGVPfJ892K51kc/WF8686fR6Hkt4nGwkSjXsnVW0XtxmrTDh4 w8Rp6ocCoF4GkXJhka/ONBm+OKwlMyoBMHKayGPQr3LbJpg5rm0FlNCF0NcXY+bH mkqGknK6PwZ26FyqjoVGk6NSI7earhw3KXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvleelhedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepnhgrth hhrghnuggsohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtoheptghorhgvhidr hhhuihhnkhgvrhesghhmrghilhdrtghomhdprhgtphhtthhopehsrghmihhmshgvihhhse hgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishht shdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Mar 2026 17:49:22 -0400 (EDT) Date: Tue, 17 Mar 2026 06:49:17 +0900 From: Michael Paquier To: Nathan Bossart Cc: Corey Huinker , Sami Imseih , pgsql-hackers@lists.postgresql.org Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3cZhxC0ASLC3AVQV" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3cZhxC0ASLC3AVQV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 16, 2026 at 03:15:14PM -0500, Nathan Bossart wrote: > On Mon, Mar 16, 2026 at 04:04:23PM -0400, Corey Huinker wrote: >> expr_attnum was something that Michael Paquier had lamented that the view >> didn't have. There is obviously no present need for it, as pg_dump isn't >> being modified for extended stats at all. >=20 > Okay. I think I'll continue to leave this one out for now. Lamenting is the right term. The expressions stored in an extended stats object have attnumbers computed by the backend, starting from -1 and decremented, and we don't expose this information at all in any system view. It could have helped in enforcing a stronger ordering of the items dumps for the extstats restore functions. I still think that it could provide an extra layer of safety. Now, we don't critically require it either based on how we pass down the input arrays, how we dump the data from the catalogs, and how we treat the order of the items given as function args. -- Michael --3cZhxC0ASLC3AVQV Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmm4et0ACgkQnvQgOdby QH3CDA/+MNqHCtwdbPqJx4kcvlzljOg14Dd3TWkMVt7+4gTgJP9iGaaEhRGTYx9q hSQTC5ZNVOdARqc9dd0bNP2de3HBRzDokwmZAORT0nVEnqBjQZQEAN4c3oniwspw mYtprRhmEORCUp1xL7fxPEDffj/4s8h8o3qtVmYEiWdhN///mgpq7m3Ee6T3D79u AA4bd8sacXVx2lwjiehO+rvM9KqV05JXvQZVjNvfZhY5vbCtQ8WWomXJF75Xo6rC F9gkuoJdJa+CVXChdk2UyjaOF4zafQHvH7iJY/ms3e57pU/24NS+fx6FLlCrYNqF QhUZegUj1jJEtZJHOLGoG95nldai3hLyAH+3A3ieCI/v4AZWNbu0egR3yM1IscaC BMV7yndcwnBxIkKJUKxZpWH6urD0BoazuODtWRKjm2JQI0e4QIxV/2YvxTY3K9J3 Jl/230HW0r+wibsTVCv9k0/NosD3AVMuZlkSDY1xvpUGtp750NpouXzPb3g3jmVb vcz0d25K216XWKKR8MPFHuNLIqCsXckG8344k3B9GLf68agCzgTJRxxSSW9sAyAj JApKNj8LvNCJuJRR9FhlCWcp7iLyM5DKvUhRNNItorXUm3BbJNHbbXWeohySBLxV MrZTUZgeN69LcDOT4g1qgICHfNLWwzJUcAoEqNp2NVGIm5Sqevk= =l1NU -----END PGP SIGNATURE----- --3cZhxC0ASLC3AVQV--