pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed(no subject)
14+ messages / 6 participants
[nested] [flat]
* (no subject)
@ 2003-02-26 13:04 daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 14+ messages in thread
From: daniel alvarez @ 2003-02-26 13:04 UTC (permalink / raw)
To: pgsql-performance
In some older mails in the archive I found rumors about difficulcies that
might
occur when OIDs are used as an integral part of a data model.
I am considering the option of placing an index on the already existing oid
and using
it as the primary key for all tables (saves some space and a sequence
lookup). This
includes saving the oid in foreign keys (virtual ones, not actually declared
references).
I read that using OID in keys is generally a bad idea. Is it really? Why
exactly?
Are there any disadvantages as to reliability or performance apart from
accidentally
forgetting to use the -o option with pg_dump? If so, please give details.
I felt especially worried by a postgres developer's statement in another
archived mail:
"As far as I know, there is no reason oid's have to be unique, especially if
they are in different tables."
(http://archives.postgresql.org/pgsql-hackers/1998-12/msg00570.php)
How unique are oids as of version 7.3 of postgres ?
Is it planned to keep oids semantically the same in future releases of
postgres?
Will the oid type be extended so that oids can be larger than 4 bytes (if
this is still
correct for 7.3) and do not rotate in large systems?
Thanks for your time and advice.
Daniel Alvarez <d-alvarez@gmx.de>
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
@ 2003-02-26 13:58 ` Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 16:02 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 14+ messages in thread
From: Richard Huxton @ 2003-02-26 13:58 UTC (permalink / raw)
To: daniel alvarez <d-alvarez@gmx.de>; pgsql-performance
On Wednesday 26 Feb 2003 1:04 pm, daniel alvarez wrote:
> In some older mails in the archive I found rumors about difficulcies that
> might
> occur when OIDs are used as an integral part of a data model.
>
> I am considering the option of placing an index on the already existing oid
> and using
> it as the primary key for all tables (saves some space and a sequence
> lookup). This
> includes saving the oid in foreign keys (virtual ones, not actually
> declared references).
> I read that using OID in keys is generally a bad idea. Is it really? Why
> exactly?
OIDs are not even guaranteed to be there any more - you can create a table
WITHOUT OIDs if you want to save some space. If you want a numeric primary
key, I'd recommend int4/int8 attached to a sequence - it's much clearer
what's going on then.
> Are there any disadvantages as to reliability or performance apart from
> accidentally
> forgetting to use the -o option with pg_dump? If so, please give details.
>
> I felt especially worried by a postgres developer's statement in another
> archived mail:
> "As far as I know, there is no reason oid's have to be unique, especially
> if they are in different tables."
> (http://archives.postgresql.org/pgsql-hackers/1998-12/msg00570.php)
>
> How unique are oids as of version 7.3 of postgres ?
OIDs are unique per object (table) I believe, no more so. See chapter 5.10 of
the user guide for details. They are used to identify system objects and so
the fact that a function and a table could both have the same OID should
cause no problems.
> Is it planned to keep oids semantically the same in future releases of
> postgres?
Couldn't say - don't see why not.
> Will the oid type be extended so that oids can be larger than 4 bytes (if
> this is still
> correct for 7.3) and do not rotate in large systems?
Strikes me as unlikely, though I'm not a developer. Look into 8-byte
serial/sequences.
--
Richard Huxton
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
@ 2003-02-26 14:59 ` daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-26 16:10 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 17:17 ` Re: OIDs as keys Josh Berkus <josh@agliodbs.com>
1 sibling, 3 replies; 14+ messages in thread
From: daniel alvarez @ 2003-02-26 14:59 UTC (permalink / raw)
To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-performance
> > I am considering the option of placing an index on the already existing
oid
> > and using it as the primary key for all tables (saves some space and a
sequence
> > lookup). This includes saving the oid in foreign keys (virtual ones, not
actually
> > declared references). I read that using OID in keys is generally a bad
idea.
> > Is it really? Why exactly?
> OIDs are not even guaranteed to be there any more - you can create a table
> WITHOUT OIDs if you want to save some space. If you want a numeric primary
> key, I'd recommend int4/int8 attached to a sequence - it's much clearer
what's
> going on then.
Of course this is a cleaner solution. I did not know that oids can be
supressed and
was looking for a way to make space usage more efficient. Trying to get rid
of user-
defined surrogate primary keys and substitute them by the already existing
OID is
obviously the wrong approch, as postgres already defines a cleaner option.
There can also be some problems when using replication, because one needs to
make
sure that OIDs are the same on all machines in the cluster.
Why should user-defined tables have OIDs by default? Other DBMS use ROWIDs
as the physical storage location used for pointers in index leafs, but this
is equivalent
to Postgres TIDs. To the user an OID column is not different than any other
column
he can define himself. I'd find it more natural if the column wasn't there
at all.
Daniel Alvarez
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
@ 2003-02-26 15:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2 siblings, 1 reply; 14+ messages in thread
From: Tom Lane @ 2003-02-26 15:56 UTC (permalink / raw)
To: daniel alvarez <d-alvarez@gmx.de>; +Cc: Richard Huxton <dev@archonet.com>; pgsql-performance
daniel alvarez <d-alvarez@gmx.de> writes:
> Why should user-defined tables have OIDs by default?
At this point it's just for historical reasons. There actually is a
proposal on the table to flip the default to WITHOUT OIDS, but so far
it's not been accepted because of worries about compatibility. See
the pghackers archives a few weeks back.
regards, tom lane
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-02-27 04:00 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 14+ messages in thread
From: Christopher Kings-Lynne @ 2003-02-27 04:00 UTC (permalink / raw)
To: daniel alvarez <d-alvarez@gmx.de>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Richard Huxton <dev@archonet.com>; pgsql-performance
> daniel alvarez <d-alvarez@gmx.de> writes:
> > Why should user-defined tables have OIDs by default?
>
> At this point it's just for historical reasons. There actually is a
> proposal on the table to flip the default to WITHOUT OIDS, but so far
> it's not been accepted because of worries about compatibility. See
> the pghackers archives a few weeks back.
Shall I include a patch to pg_dump that will explicitly set WITH OIDS when I
submit this SET STORAGE dumping patch?
Chris
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-02-27 06:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 14+ messages in thread
From: Tom Lane @ 2003-02-27 06:35 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; pgsql-performance
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Shall I include a patch to pg_dump that will explicitly set WITH OIDS when I
> submit this SET STORAGE dumping patch?
Not if you want it to be accepted ;-)
We pretty much agreed we did not want that in the prior thread.
regards, tom lane
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-02-27 07:00 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:06 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 14+ messages in thread
From: Christopher Kings-Lynne @ 2003-02-27 07:00 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; pgsql-performance
> "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> > Shall I include a patch to pg_dump that will explicitly set WITH OIDS
when I
> > submit this SET STORAGE dumping patch?
>
> Not if you want it to be accepted ;-)
>
> We pretty much agreed we did not want that in the prior thread.
The patch I submitted did not include OID stuff, I decided that it's better
to submit orthogonal patches :)
Chris
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-02-27 07:06 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:19 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-28 01:51 ` Re: OIDs as keys Ron Mayer <ron@intervideo.com>
0 siblings, 2 replies; 14+ messages in thread
From: Tom Lane @ 2003-02-27 07:06 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; pgsql-performance
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> The patch I submitted did not include OID stuff, I decided that it's better
> to submit orthogonal patches :)
Right. But the problem with switching the OID default is not a matter
of code --- it's of working out what the compatibility issues are.
As I recall, one thing people did not want was for pg_dump to plaster
WITH OIDS or WITHOUT OIDS on every single CREATE TABLE, as this would
pretty much destroy any shot at loading PG dumps into any other
database. What we need is an agreement on the behavior we want (making
the best possible compromise between this and other compatibility
desires). After that, the actual patch is probably trivial, while in
advance of some consensus on the behavior, offering a patch is a waste
of time.
regards, tom lane
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:06 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-02-27 07:19 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:30 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 14+ messages in thread
From: Christopher Kings-Lynne @ 2003-02-27 07:19 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; pgsql-performance
> Right. But the problem with switching the OID default is not a matter
> of code --- it's of working out what the compatibility issues are.
> As I recall, one thing people did not want was for pg_dump to plaster
> WITH OIDS or WITHOUT OIDS on every single CREATE TABLE, as this would
> pretty much destroy any shot at loading PG dumps into any other
> database.
Ummm...what about SERIAL columns, ALTER TABLE / SET STATS, SET STORAGE,
custom types, 'btree' in CREATE INDEX, SET SEARCH_PATH, '::" cast operator,
stored procedures, rules, etc. - how is adding WITH OIDS going to change
that?!
> What we need is an agreement on the behavior we want (making
> the best possible compromise between this and other compatibility
> desires). After that, the actual patch is probably trivial, while in
> advance of some consensus on the behavior, offering a patch is a waste
> of time.
Sure.
Chris
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:06 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:19 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2003-02-27 07:30 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 14+ messages in thread
From: Tom Lane @ 2003-02-27 07:30 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; pgsql-performance
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
>> As I recall, one thing people did not want was for pg_dump to plaster
>> WITH OIDS or WITHOUT OIDS on every single CREATE TABLE, as this would
>> pretty much destroy any shot at loading PG dumps into any other
>> database.
> Ummm...what about SERIAL columns, ALTER TABLE / SET STATS, SET STORAGE,
> custom types, 'btree' in CREATE INDEX, SET SEARCH_PATH, '::" cast operator,
> stored procedures, rules, etc. - how is adding WITH OIDS going to change
> that?!
It's moving in the wrong direction. We've been slowly eliminating
unnecessary nonstandardisms in pg_dump output; this puts in a new one
in a quite fundamental place. You could perhaps expect another DB
to drop commands it didn't understand like SET SEARCH_PATH ... but if
it drops all your CREATE TABLEs, you ain't got much dump left to load.
I'm not necessarily wedded to the above argument myself, mind you;
but it is a valid point that needs to be weighed in the balance of
what we're trying to accomplish.
The bottom line is that "code first, design later" is no way to
approach this problem.
regards, tom lane
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:06 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-02-28 01:51 ` Ron Mayer <ron@intervideo.com>
1 sibling, 0 replies; 14+ messages in thread
From: Ron Mayer @ 2003-02-28 01:51 UTC (permalink / raw)
To: pgsql-performance; +Cc: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>
Tom wrote:
>
>As I recall, one thing people did not want was for pg_dump to plaster
>WITH OIDS or WITHOUT OIDS on every single CREATE TABLE, as this would
>pretty much destroy any shot at loading PG dumps into any other
>database.
Has there been any talk about adding a flag to pg_dump to explicitly
ask for a standard format? (sql3? sql99? etc?) Ideally for me, such
a flag would produce a "portable" dump file of the subset that did
follow the standard, and also produce a separate log file that could
contain any constructs that could not be standardly dumped.
If such a flag existed, it might be the easiest way to load to other
databases, and people might be less opposed to plastering more postgres
specific stuff to the default format.
If I were going to try to write portable dumps for other databases, I'd
want as few postgresisms in the big file as possible. The separate log file
would make it easier for me to make hand-ported separate files to set up
functions, views, etc.
Yes, I know that would restrict the functionality I could
depend on, including types, sequences, etc. However if I were in an
environment where developers did prototyping on postgres / mssql /etc
and migrated functionality to whatever the company's official
standard system was, I think developers would want to constrain
themselves to standards as much as possible, and this option may help
them do so.
Ron
PS: I'm not sure if I'm volunteering or not, unless someone tells
me how easy/hard it would be. Last thing I tried was harder
than it first appeared.
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
@ 2003-02-26 16:10 ` Richard Huxton <dev@archonet.com>
2 siblings, 0 replies; 14+ messages in thread
From: Richard Huxton @ 2003-02-26 16:10 UTC (permalink / raw)
To: daniel alvarez <d-alvarez@gmx.de>; +Cc: pgsql-performance
On Wednesday 26 Feb 2003 2:59 pm, daniel alvarez wrote:
>
> Why should user-defined tables have OIDs by default? Other DBMS use ROWIDs
> as the physical storage location used for pointers in index leafs, but this
> is equivalent
> to Postgres TIDs. To the user an OID column is not different than any other
> column
> he can define himself. I'd find it more natural if the column wasn't there
> at all.
I believe the plan is to phase them out, but some people are using them, so
the default is still to create them. Imagine if you were using OIDs as keys
and after a dump/restore they were all gone...
--
Richard Huxton
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
@ 2003-02-26 17:17 ` Josh Berkus <josh@agliodbs.com>
2 siblings, 0 replies; 14+ messages in thread
From: Josh Berkus @ 2003-02-26 17:17 UTC (permalink / raw)
To: daniel alvarez <d-alvarez@gmx.de>; Richard Huxton <dev@archonet.com>; +Cc: pgsql-performance
Daniel,
> There can also be some problems when using replication, because one needs
> to make
> sure that OIDs are the same on all machines in the cluster.
See the "uniqueidentifier" contrib package if you need a universally unique id
for replication.
> I'd find it more natural if the column wasn't there
> at all.
Probably by Postgres 8.0, it won't be.
--
Josh Berkus
Aglio Database Solutions
San Francisco
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: OIDs as keys
2003-02-26 13:04 (no subject) daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
@ 2003-02-26 16:02 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 14+ messages in thread
From: Tom Lane @ 2003-02-26 16:02 UTC (permalink / raw)
To: Richard Huxton <dev@archonet.com>; +Cc: daniel alvarez <d-alvarez@gmx.de>; pgsql-performance
Richard Huxton <dev@archonet.com> writes:
>> How unique are oids as of version 7.3 of postgres ?
> OIDs are unique per object (table) I believe, no more so.
Even then, you should only assume uniqueness if you put a unique index
on the table's OID column to enforce it. (The system catalogs that use
OID all have such indexes.) Without that, you might have duplicates
after the OID counter wraps around.
>> Will the oid type be extended so that oids can be larger than 4 bytes (if
>> this is still correct for 7.3) and do not rotate in large systems?
> Strikes me as unlikely, though I'm not a developer.
I tend to agree. At one point that was a live possibility, but now
we're more likely to change the default for user tables to WITHOUT OIDS
and declare the problem solved. Making OIDs 8 bytes looks like too much
of a performance hit for non-64-bit machines. (Not to mention machines
that haven't got "long long" at all; right now the only thing that
doesn't work for them is type int8, and I'd like it to stay that way,
at least for a few more years.)
regards, tom lane
^ permalink raw reply [nested|flat] 14+ messages in thread
end of thread, other threads:[~2003-02-28 01:51 UTC | newest]
Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 13:04 daniel alvarez <d-alvarez@gmx.de>
2003-02-26 13:58 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 14:59 ` Re: OIDs as keys daniel alvarez <d-alvarez@gmx.de>
2003-02-26 15:56 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 04:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 06:35 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:00 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:06 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-27 07:19 ` Re: OIDs as keys Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-02-27 07:30 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
2003-02-28 01:51 ` Re: OIDs as keys Ron Mayer <ron@intervideo.com>
2003-02-26 16:10 ` Re: OIDs as keys Richard Huxton <dev@archonet.com>
2003-02-26 17:17 ` Re: OIDs as keys Josh Berkus <josh@agliodbs.com>
2003-02-26 16:02 ` Re: OIDs as keys Tom Lane <tgl@sss.pgh.pa.us>
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