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: Convert unused_oids and duplicate_oids to use Catalog.pm infrast
Date: Wed, 25 Apr 2018 20:02:05 +0000
Message-ID: <E1fBQc9-00089f-0g@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1fBQc9-00089f-0g@gemulon.postgresql.org>
Permalink:  ../E1fBQc9-00089f-0g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fBQc9-00089f-0g@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: Convert unused_oids and duplicate_oids to use Catalog.pm infrast
  In-Reply-To: <E1fBQc9-00089f-0g@gemulon.postgresql.org>
  References: <E1fBQc9-00089f-0g@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