pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't require pg_class.dat to contain correct relnatts values.
Date: Sat, 15 Feb 2020 19:58:52 +0000
Message-ID: <E1j33aW-0001gm-Oe@gemulon.postgresql.org> (raw)

Don't require pg_class.dat to contain correct relnatts values.

Practically everybody who's ever added a column to one of the bootstrap
catalogs has been burnt by the need to update the relnatts field in the
initial pg_class data to match.  Now that we use Perl scripts to
generate postgres.bki, we can have the machines take care of that,
by filling the field during genbki.pl.

While at it, use the BKI_DEFAULTS mechanism to eliminate repetitive
specifications of other column values in pg_class.dat, too.  They
weren't particularly a maintenance problem, but this way is prettier
(certainly the spotty previous usage of BKI_DEFAULTS wasn't pretty).

No catversion bump needed, since this doesn't actually change the
contents of postgres.bki.

Per gripe from Justin Pryzby, though this is quite different from
his originally proposed solution.

Amit Langote, John Naylor, Tom Lane

Discussion: https://postgr.es/m/20200212182337.GZ1412@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/86ff085e83888e2e359620fc326608a674423308

Modified Files
--------------
src/backend/catalog/genbki.pl    |  9 +++++++
src/include/catalog/pg_class.dat | 46 ++++------------------------------
src/include/catalog/pg_class.h   | 53 +++++++++++++++++++++-------------------
3 files changed, 42 insertions(+), 66 deletions(-)



Message-ID: <E1j33aW-0001gm-Oe@gemulon.postgresql.org>
Permalink:  ../E1j33aW-0001gm-Oe@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1j33aW-0001gm-Oe@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Don't require pg_class.dat to contain correct relnatts values.
  In-Reply-To: <E1j33aW-0001gm-Oe@gemulon.postgresql.org>
  References: <E1j33aW-0001gm-Oe@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox