pgsql: Convert unused_oids and duplicate_oids to use Catalog.pm infrast

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert unused_oids and duplicate_oids to use Catalog.pm infrast
Date: 2018-04-25 20:02:05
Message-ID: E1fBQc9-00089f-0g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2018-04-26 01:52:07 pgsql: Correct pg_recvlogical server version test.
Previous Message Robert Haas 2018-04-25 19:30:25 pgsql: Prevent generation of bogus subquery scan paths.