Re: WIP: a way forward on bootstrap data
John Naylor <jcnaylor@gmail.com>
From: John Naylor <jcnaylor@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, David Fetter <david@fetter.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-16T02:46:55Z
Lists: pgsql-hackers
On 1/14/18, Tom Lane <tgl@sss.pgh.pa.us> wrote: > So, for each catalog header pg_foo.h, there would be a > generated file, say pg_foo_d.h, containing: > > * Natts_ and Anum_ macros for pg_foo > > * Any EXPOSE_TO_CLIENT_CODE sections copied from pg_foo.h > > * Any OID-value macros for entries in that catalog I'm on board in principle, but I have some questions: How do we have the makefiles gracefully handle 62 generated headers which need to be visible outside the backend? Can I generalize the approach I took for the single OIDs file I had, or is that not even the right way to go? (In short, I used a new backend make target that was invoked in src/common/Makefile - the details are in patch v6-0006) If we move fmgr oid generation here as you suggested earlier, I imagine we don't want to create a lot of #include churn. My idea is to turn src/include/utils/fmgroids.h into a static file that just #includes catalog/pg_proc_d.h. Thoughts? And I'm curious, what is "_d" intended to convey? (While I'm thinking outloud, I'm beginning to think that these headers lie outside the scope of genbki.pl, and belong in a separate script.) -John Naylor
Commits
-
Clarify handling of special-case values in bootstrap catalog data.
- 45c6d75f8cd2 11.0 landed
-
Replace our traditional initial-catalog-data format with a better design.
- 372728b0d495 11.0 landed
-
Faster partition pruning
- 9fdb675fc5d2 11.0 cited
-
Minor cleanup in genbki.pl.
- 8d90b4d01a61 11.0 landed
-
Trivial adjustments in preparation for bootstrap data conversion.
- a351679c806e 11.0 landed
-
Remove hard-coded schema knowledge about pg_attribute from genbki.pl
- 49c784ece766 11.0 landed
-
Minor edits to catalog files and scripts
- 9373baa0f764 11.0 landed
-
Hide most variable-length fields from Form_pg_* structs
- 8137f2c32322 9.2.0 cited