Re: Why don't we have a small reserved OID range for patch revisions? - Mailing list pgsql-hackers

From John Naylor
Subject Re: Why don't we have a small reserved OID range for patch revisions?
Date
Msg-id CACPNZCsHdcQN2jQ1=ptbi1Co2Nj3aHgRCUMk62=ThgWNabPY+Q@mail.gmail.com
Whole thread Raw
In response to Re: Why don't we have a small reserved OID range for patch revisions?  (John Naylor <john.naylor@2ndquadrant.com>)
Responses Re: Why don't we have a small reserved OID range for patch revisions?  (John Naylor <john.naylor@2ndquadrant.com>)
Re: Why don't we have a small reserved OID range for patch revisions?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:

> On 2/8/19, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A script such as you suggest might be a good way to reduce the temptation
>> to get lazy at the last minute.  Now that the catalog data is pretty
>> machine-readable, I suspect it wouldn't be very hard --- though I'm
>> not volunteering either.  I'm envisioning something simple like "renumber
>> all OIDs in range mmmm-nnnn into range xxxx-yyyy", perhaps with the
>> ability to skip any already-used OIDs in the target range.
>
> This might be something that can be done inside reformat_dat_files.pl.
> It's a little outside it's scope, but better than the alternatives.

Along those lines, here's a draft patch to do just that. It handles
array type oids as well. Run it like this:

perl  reformat_dat_file.pl  --map-from 9000  --map-to 2000  *.dat

There is some attempt at documentation. So far it doesn't map by
default, but that could be changed if we agreed on the convention of
9000 or whatever.

-- 
John Naylor                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: 'Bruce Momjian'
Date:
Subject: Re: Protect syscache from bloating with negative cache entries
Next
From: Alvaro Herrera
Date:
Subject: Re: Early WIP/PoC for inlining CTEs