Re: WIP: a way forward on bootstrap data

From: John Naylor <jcnaylor(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: a way forward on bootstrap data
Date: 2018-01-30 10:13:25
Message-ID: CAJVSVGUY0RgXubbRYKGWa1xSuO_U4qqzFVOf2XeVL=H-1T5=Dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/14/18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

Attachment Content-Type Size
v7-apply-bootstrap-data-patches.sh application/x-sh 2.3 KB
v7-0001-Create-data-conversion-infrastructure.patch text/x-patch 25.6 KB
v7-0002-Hand-edits-of-data-files.patch text/x-patch 136.8 KB
v7-0003-Reduce-indentation-level.patch text/x-patch 16.7 KB
v7-0004-Update-catalog-scripts-to-read-data-files.patch text/x-patch 25.0 KB
v7-0005-Clean-up-header-files-and-update-comments.patch text/x-patch 83.2 KB
v7-0006-Move-symbols-from-catalog-headers-to-generated-de.patch text/x-patch 110.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2018-01-30 10:48:16 Re: Add RANGE with values and exclusions clauses to the Window Functions
Previous Message Masahiko Sawada 2018-01-30 10:00:34 Re: [HACKERS] Subscription code improvements