pgsql: Convert unused_oids and duplicate_oids to use Catalog.pminfrast - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Convert unused_oids and duplicate_oids to use Catalog.pminfrast
Date
Msg-id E1fBQc9-00089f-0g@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Convert unused_oids and duplicate_oids to use Catalog.pm infrastructure.

unused_oids was previously a shell script, which of course didn't work at
all on Windows.  Also, commit 372728b0d introduced some other portability
problems, as complained of by Stas Kelvich.  We can improve matters by
converting it to Perl.

While we're at it, let's future-proof both this script and duplicate_oids
to use Catalog.pm rather than having a bunch of ad-hoc logic for parsing
catalog headers and .dat files.  These scripts are thereby a bit slower,
which doesn't seem like a problem for typical manual use.  It is a little
annoying for buildfarm purposes, but we should be able to fix that case
by having genbki.pl make the check instead of parsing the headers twice.
(That's not done in this commit, though.)

Stas Kelvich, adjusted a bit by me

Discussion: https://postgr.es/m/37D774E4-FE1F-437E-B3D2-593F314B7505@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5602265f770f400a03b4a4ca22b3cd530c294bc2

Modified Files
--------------
src/backend/catalog/Catalog.pm     | 51 ++++++++++++++++++++++++++++++
src/include/catalog/duplicate_oids | 23 +++++---------
src/include/catalog/unused_oids    | 63 ++++++++++++++++++--------------------
3 files changed, 89 insertions(+), 48 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Prevent generation of bogus subquery scan paths.
Next
From: Noah Misch
Date:
Subject: pgsql: Correct pg_recvlogical server version test.