1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Sync commentary in transam.h and bki.sgml.

Commit a6417078c missed updating some comments in transam.h about
reservation of high OIDs for development purposes.  Also tamp down
an over-optimistic comment there about how easy it'd be to change
FirstNormalObjectId.

Earlier, commit 09568ec3d failed to update bki.sgml for the split
between genbki.pl-assigned OIDs and those assigned during initdb.

Also fix genbki.pl so that it will complain if it overruns
that split.  It's possible that doing so would have no very bad
consequences, but that's no excuse for not detecting it.
This commit is contained in:
Tom Lane
2019-03-14 00:23:33 -04:00
parent 364298be22
commit 401b87a24f
3 changed files with 33 additions and 16 deletions

View File

@ -138,10 +138,13 @@ die "found $found duplicate OID(s) in catalog data\n" if $found;
# Oids not specified in the input files are automatically assigned,
# starting at FirstGenbkiObjectId.
# starting at FirstGenbkiObjectId, extending up to FirstBootstrapObjectId.
my $FirstGenbkiObjectId =
Catalog::FindDefinedSymbol('access/transam.h', $include_path,
'FirstGenbkiObjectId');
my $FirstBootstrapObjectId =
Catalog::FindDefinedSymbol('access/transam.h', $include_path,
'FirstBootstrapObjectId');
my $GenbkiNextOid = $FirstGenbkiObjectId;
@ -625,6 +628,11 @@ foreach my $declaration (@index_decls)
# last command in the BKI file: build the indexes declared above
print $bki "build indices\n";
# check that we didn't overrun available OIDs
die
"genbki OID counter reached $GenbkiNextOid, overrunning FirstBootstrapObjectId\n"
if $GenbkiNextOid > $FirstBootstrapObjectId;
# Now generate schemapg.h