Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-03-12T20:16:31Z
Lists: pgsql-hackers
Attachments
- v5-0001-Add-test-view-pg_stats_check.patch (text/x-patch) patch v5-0001
- v5-0002-Add-tableid-statid-attnum-expr_attnum-columns-to-.patch (text/x-patch) patch v5-0002
- v5-0003-pg_dump-Use-tableid-in-getAttributeStats.patch (text/x-patch) patch v5-0003
On Tue, Mar 10, 2026 at 12:42 PM Corey Huinker <corey.huinker@gmail.com> wrote: > > > On Tue, Mar 10, 2026 at 12:37 PM Nathan Bossart <nathandbossart@gmail.com> > wrote: > >> On Mon, Mar 09, 2026 at 06:42:46PM -0400, Corey Huinker wrote: >> > If you want 0003 split into two (one for pg_stats_ext and one for >> > pg_stats_ext_exprs) I can do that, but they felt like a package deal to >> me. >> >> Sorry to throw a curveball here, but I think the best way to structure >> this >> patch set is as follows: >> >> * 0001: Just the test changes (e.g., replacing * with column lists). By >> doing that first, the actual functionality changes in 0002 will be easier >> to see. >> > > Makes sense. > > >> >> * 0002: Adding columns to the all the views (this one will do a catalog >> bump). If we need to make a couple of test adjustments to verify the OIDs >> or attribute IDs, that's fine, but those can be pretty minimal. >> > > So all three views in one go. +1 > > >> >> * 0003: Associated pg_dump changes. >> > > On it. > Apologies for the delay. I thought I had posted this. I rebased it against a630ac5c2016e52 (current HEAD).
Commits
-
pg_dump: Simplify query for retrieving attribute statistics.
- 4b5ba0c4ca52 19 (unreleased) landed
-
Add more columns to pg_stats, pg_stats_ext, and pg_stats_ext_exprs.
- 3b88e50d6c2e 19 (unreleased) landed
-
Add convenience view to stats import test.
- 233bbdf031e4 19 (unreleased) landed