Re: ALTER TABLE .. < ADD | DROP > OIDS - Mailing list pgsql-performance

From Tom Lane
Subject Re: ALTER TABLE .. < ADD | DROP > OIDS
Date
Msg-id 13034.1039208700@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE .. < ADD | DROP > OIDS  (Rod Taylor <rbt@rbt.ca>)
Responses Re: ALTER TABLE .. < ADD | DROP > OIDS
List pgsql-performance
Rod Taylor <rbt@rbt.ca> writes:
> Ok.. If you think thats safe, I'll give it a try.  I was afraid that the
> system would confuse itself if the table had mix and matched tuples in
> it.  New tuples without oids, old tuples with.

Manfred's original implementation would have failed (since it didn't
have a tuple-header hasoid bit).  I think I got all the places that
should consult the header bit, but there may be some left; you'll need
to test.

> That helps DROP OID.  How about ADD OID?

What about it?  I think it'll work just like adding a column, except
that OID will probably read as 0 not NULL if the row hasn't been updated
yet.  (You could probably make it read as NULL if you wanted though.)

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Speeding up aggregates
Next
From: Rod Taylor
Date:
Subject: Re: ALTER TABLE .. < ADD | DROP > OIDS