From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why don't we have a small reserved OID range for patch revisions? |
Date: | 2019-02-27 21:27:04 |
Message-ID: | 12112.1551302824@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 2019-02-08 19:14, Tom Lane wrote:
>> Quite a few people have used OIDs up around 8000 or 9000 for this purpose;
>> I doubt we need a formally reserved range for it. The main problem with
>> doing it is the hazard that the patch'll get committed just like that,
>> suddenly breaking things for everyone else doing likewise.
> For that reason, I'm not in favor of this. Forgetting to update the
> catversion is already common enough (for me). Adding another step
> between having a seemingly final patch and being able to actually commit
> it doesn't seem attractive. Moreover, these "final adjustments" would
> tend to require a full rebuild and retest, adding even more overhead.
> OID collision doesn't seem to be a significant problem (for me).
Um, I beg to differ. It's not at all unusual for pending patches to
bit-rot for no reason other than suddenly getting an OID conflict.
I don't have to look far for a current example:
https://travis-ci.org/postgresql-cfbot/postgresql/builds/498955351
We do need a couple of pieces of new infrastructure to make this idea
conveniently workable. One is a tool to allow automatic OID renumbering
instead of having to do it by hand; Naylor has a draft for that upthread.
Perhaps it'd be useful for genbki.pl to spit out a warning (NOT an
error) if it sees OIDs in the reserved range. I'm not sure that that'd
really be worth the trouble though, since one could easily forget
about it while reviewing/testing just before commit, and it'd just be
useless noise up until it was time to commit.
Another issue, as Robert pointed out, is that this does need to be
a formal convention not something undocumented. Naylor's patch adds
a mention of it in bki.sgml, but I wonder if anyplace else should
talk about it.
I concede your point that a prudent committer would do a rebuild and
retest rather than just trusting the tool. But really, how much
extra work is that? If you've spent any time optimizing your workflow,
a full rebuild and check-world should be under five minutes on any
hardware anyone would be using for development today.
And, yeah, we probably will make mistakes like this, just like we
sometimes forget the catversion bump. As long as we have a tool
for OID renumbering, I don't think that's the end of the world.
Fixing it after the fact isn't going to be a big deal, any more
than it is for catversion.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-02-27 21:41:37 | Re: POC: converting Lists into arrays |
Previous Message | Shawn Debnath | 2019-02-27 21:26:54 | Re: Refactoring the checkpointer's fsync request queue |