Re: Why don't we have a small reserved OID range for patch revisions?
John Naylor <john.naylor@2ndquadrant.com>
From: John Naylor <john.naylor@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Geoghegan <pg@bowt.ie>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-03-10T17:11:18Z
Lists: pgsql-hackers
Attachments
- v2-0001-Provide-script-to-renumber-OIDs.patch (text/x-patch) patch v2-0001
On Sat, Mar 9, 2019 at 1:14 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > I took a quick look at this. I went ahead and pushed the parts that > were just code cleanup in reformat_dat_file.pl, since that seemed > pretty uncontroversial. As far as the rest of it goes: Okay, thanks. > * I'm really not terribly happy with sticking this functionality into > reformat_dat_file.pl. First, there's an issue of discoverability: > it's not obvious that a script named that way would have such an > ability. Second, it clutters the script in a way that seems to me > to hinder its usefulness as a basis for one-off hacks. So I'd really > rather have a separate script named something like "renumber_oids.pl", > even if there's a good deal of code duplication between it and > reformat_dat_file.pl. > * In my vision of what this might be good for, I think it's important > that it be possible to specify a range of input OIDs to renumber, not > just "everything above N". I agree the output range only needs a > starting OID. Now it looks like: perl renumber_oids.pl --first-mapped-oid 8000 --last-mapped-oid 8999 --first-target-oid 2000 *.dat To prevent a maintenance headache, I didn't copy any of the formatting logic over. You'll also have to run reformat_dat_files.pl afterwards to restore that. It seems to work, but I haven't tested thoroughly. -- John Naylor https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Remove remaining hard-wired OID references in the initial catalog data.
- 3aa0395d4ed3 12.0 landed
-
Create a script that can renumber manually-assigned OIDs.
- a6417078c414 12.0 landed
-
Minor improvements for reformat_dat_file.pl.
- 27aaf6eff49a 12.0 landed