Don't require pg_class.dat to contain correct relnatts values.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Feb 2020 19:57:27 +0000 (14:57 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Feb 2020 19:57:27 +0000 (14:57 -0500)
commit86ff085e83888e2e359620fc326608a674423308
tree843dd594fa0a2a20f1157c538bd51e0b05855824
parent317906f2a634090a79ca95d5816931c4ce8dca5a
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
src/backend/catalog/genbki.pl
src/include/catalog/pg_class.dat
src/include/catalog/pg_class.h