On Wed, Oct 21, 2026 at 07:00:10AM +0700, John Naylor wrote: > *** Catalogs (TODO) > > While the PoC sidesteps this entirely for now, this is actually how I > started. About a year and half ago, I experimented with catalog header > annotations so that the usual couple hundred lines of Perl would > generate the code that transforms the catalog tuples. Earlier this > year, I turned that into a throwaway "offline upgrade" (i.e. no WAL) > prototype. That exercise indicated that this method could feasibly > handle all catalog schema changes since PG12. Example from pg_class: > > ``` > /* # of tuples (not always up-to-date; -1 means "unknown") */ > float4 reltuples BKI_DEFAULT(-1) CHANGEDVALUE(14, > FUNC(reltuples_zero_to_unknown)); > > [...] > /* # of all-frozen blocks (not always up-to-date) */ > int32 relallfrozen BKI_DEFAULT(0) FIRSTVERSION(18, CONST(0)); > ```
As I understand it, instead of recreating the catalogs from pg_dump --schema-only, you are modifying the actual catalogs. Yes, this will certainly be faster than what we do now. I never tried this since it would require changes/testing for each major release, and I didn't think that would be reasonable. It might now be possible given our resources. -- Bruce Momjian <[email protected]> https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.
