Re: WIP: a way forward on bootstrap data
John Naylor <jcnaylor@gmail.com>
From: John Naylor <jcnaylor@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-30T10:13:25Z
Lists: pgsql-hackers
Attachments
- v7-apply-bootstrap-data-patches.sh (application/x-sh)
- v7-0001-Create-data-conversion-infrastructure.patch (text/x-patch) patch v7-0001
- v7-0002-Hand-edits-of-data-files.patch (text/x-patch) patch v7-0002
- v7-0003-Reduce-indentation-level.patch (text/x-patch) patch v7-0003
- v7-0004-Update-catalog-scripts-to-read-data-files.patch (text/x-patch) patch v7-0004
- v7-0005-Clean-up-header-files-and-update-comments.patch (text/x-patch) patch v7-0005
- v7-0006-Move-symbols-from-catalog-headers-to-generated-de.patch (text/x-patch) patch v7-0006
On 1/14/18, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I've got zero faith that the .h files will hold still long enough > for these patches to be reviewed and applied. The ones that touch > significant amounts of data need to be explained as "run this script > on the current data", rather than presented as static diffs. For version 7, I've attached a bash script along with the patches (against master a044378ce2f) that does exactly this. To run, one would save the patches somewhere and change the PATCH_DIR and REPO_DIR variables to match. -I've added MSVC changes, but they are untested. -I've moved a cosmetic patch up in the series to reduce rebasing effort. There are some additional comment and style changes. Not done in this version: -For the time being I've left out human-readable OIDs and data file compaction strategies. This is just to reduce effort in rebasing. I'll add some form of those back after the basics have had serious review. -Change who is responsible for fmgroids.h. It's debatable whether that would be a gain anyway. The README might need to be fleshed out further, possibly with a separate README for working with the new data format. > 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 This is done (patch 0006). As I mentioned earlier, the sticking point is the makefiles. I have a working build, but it's not up to project standards. In particular, for the first attempt I've resorted to discarding conventions for parallel make safety, so if anyone can review and offer improvements, I'd be grateful. > The .dat files need to have header comments that follow project > conventions, in particular they need to contain copyright statements. > Likewise for generated files. Done. I'll also go ahead and move this to next commitfest. -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