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 1w2Gno-0008ve-1w for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 22:52:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Gnn-00DvDQ-1d for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 22:52:47 +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.96) (envelope-from ) id 1w2Gnn-00DvDH-0i for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 22:52:47 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2Gnk-00000000VJ8-394g for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 22:52:46 +0000 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-467161c4a1cso1809859b6e.3 for ; Mon, 16 Mar 2026 15:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773701562; x=1774306362; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iH+PNCAGCCfC7WNuim5IQTleQx6ewZ1FkMjx94BNNBQ=; b=bLBbI5JJAiQfI1KZ1EJCjwiaTPFGRnsAP4s7n0rLcApqXb/Br9is3QUATPP7BGc/X+ HYv6zhfhCvDUYPCLXBuUvd9M60z136cv6pjW4ip50LdHr+kt10z2nWpXUX6UJfcI2unb qhUvcSLWzDAqdfdYJS3ruryF6gYQtZprcWHMGSAif7rpU6TGblYlevhTEcZwWTx6rLbA OU3EypigfgSKopPS9CxWCo99Qe3e0WNDHwe5sNlxxKdnzqQFb0qkuSD3I/72SCdn+Gru nyUglU7OEl7Q8b+UoMBniJ+7R5TrwOydAdLQ6IIqDFwb591k2msPR1xnSHyevJECwBed 2trg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773701562; x=1774306362; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iH+PNCAGCCfC7WNuim5IQTleQx6ewZ1FkMjx94BNNBQ=; b=E4LkRLI8fBtHrEmYS84b6Tr9blAICJtvFhTCtga9bu7ofNb7qM1f3EJAkoBFbDuf+W XivAoX9lH7jDDmhyxu+p9qXX7kBZhRU30BfApsAYpyIkipx9ih3k0FD/WdZSjUdvynck zvrzGHlQ/veDozEavjajSr7sXnaIOf/1eDmrjkSry8fMVJCjgCob5c91veBf74JrYAzm 8FO5OKvMQfUIoifmx2+ioyQiB5NjUn6VJPbs+BDiUj0WXnP4Xt25GYZflevg6y9tsi7c R+okmxDEOZT/1sOBtZkMsZZikMKAGDbzEVrNY85iQV6ayzfBVwdVlszQN+n4mDHvREY/ H5ww== X-Forwarded-Encrypted: i=1; AJvYcCXgGC41/Og31k03fbh1Sq+JRCHHnkTkhFN3TIMyel3BZSvl8nfBUYGNasoAkEMNDQl6Lil1WOlp/nz77KUA@lists.postgresql.org X-Gm-Message-State: AOJu0YzOZ9l1g11QwV8VBWokA2tJtEk73ttw20s5h73dk/dJ1In+6G4y wcdze+BFRoUEyjnUlcbwdp/OqV9uFqWk7cD5E9T8RfYYgZtRq/mAtGSk X-Gm-Gg: ATEYQzzcfhbF9doVSgEsm1b9XNBAf4Zpyfrk/HSUq1taxQLVKa5vO8438j8jCJCwTNq 5uKqEoJsNM9bGH+5I4F2w8HQHK/Piq6gxfhPBywYnW555I4oavst3pCFXureE8/sP6WtdPG4R0N blV89o50XxPENm9NO/huVRFxOG4metxWsziyO7qxyIJv5nMPD9CkS1SSV7lYwP8JG5VE0MaIus7 jlClvRU/oSEtJlC0TeheymFUrvTboevoakxqlvKQpbpSHx2AdBsGhPl7egMuHuz8kSdAzbMx3zx bqYF5oAIU3Rd/L4SNG31JfGLmzyvR2MwacGL3IJzfTDOyE3bPbRWpl30viNaK/rGJmsYY8VvL6+ Bme6Im3bw6963VLChw2ANTkGNr9wi3MF88p1sCT/Xk11FJIOslM2GVRD6PQJX8FPEx0aLmwt1q3 lA9pNSSn6eX+ZSwK5CvxfSnqns7uHQ8fZ5WaLJOWO3mDpnHOki X-Received: by 2002:a05:6808:152b:b0:467:2926:1228 with SMTP id 5614622812f47-467575e9301mr8612341b6e.49.1773701562346; Mon, 16 Mar 2026 15:52:42 -0700 (PDT) Received: from nathan ([2600:382:8818:6aae:4cf0:1ba0:c07e:596a]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4177e69c79dsm16223637fac.15.2026.03.16.15.52.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2026 15:52:41 -0700 (PDT) Date: Mon, 16 Mar 2026 17:52:38 -0500 From: Nathan Bossart To: Michael Paquier 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 17, 2026 at 06:49:17AM +0900, Michael Paquier wrote: > 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. >> >> 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. FTR I'm not mortally opposed to the idea. I just want to get the easier stuff out of the way first so we can commit the pg_dump change. Then we can give expr_attnum our undivided attention. -- nathan