Re: An Idea for OID conflicts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Dunstan <pgsql(at)tomd(dot)cc>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: An Idea for OID conflicts
Date: 2006-09-18 23:07:29
Message-ID: 18881.1158620849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Dunstan <pgsql(at)tomd(dot)cc> writes:
> [ some good arguments snipped ]

> I like the script idea much better. It wouldn't be bad to even allow
> patches to be submitted with OIDs in the high 9000 or whatever range.
> The committer responsible for committing the patch could just run the
> update script before comitting the code.

The scary thing about a script is the assumption that it will make all
and only the changes needed. Four-digit magic numbers are not that
uncommon in C code. I think it might be safer if we made the arbitrary
OID range for an uncommitted patch be large, say eight digits (maybe
"12345xxx"). The script would knock these down to 4-digit numbers,
ie removing one tab stop, so it wouldn't be too hard on your formatting.
Given the current OID generation mechanism, the presence of large OIDs
in the initial catalogs shouldn't be a problem for testing patches,
even assuming that the OID counter gets that high in your test database.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Albert Cervera Areny 2006-09-18 23:10:48 Tablespaces for temporary objects
Previous Message Andrew Dunstan 2006-09-18 22:55:38 Re: minor feature request: Secure defaults during