Re: [PATCHES] CLUSTER not lose indexes - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCHES] CLUSTER not lose indexes
Date
Msg-id Pine.LNX.4.44.0207130051430.28230-100000@localhost.localdomain
Whole thread Raw
Responses Re: [PATCHES] CLUSTER not lose indexes
Re: [PATCHES] CLUSTER not lose indexes
List pgsql-hackers
Tom Lane writes:

> > Also, is the new relfilenode somehow guaranteed to
> > not be assigned to another relation (pg_class tuple, I think)?
>
> I've been wondering about that myself.  We might have to add a unique
> index on pg_class.relfilenode to ensure this; otherwise, after OID
> wraparound there would be no guarantees.

I've never been happy with the current setup.  It's much too tempting to
think file name = OID, both in the backend code and by external onlookers,
especially since it's currently rare/impossible(?) for them to be
different.

It would be a lot clearer if relfilenode were replaced by an integer
version, starting at 0, and the heap files were named "OID_VERSION".

(In related news, how about filling up the oid/relfilenode numbers with
zeros on the left, so a directory listing would reflect the numerical
order?)

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: getopt bug
Next
From: Bruce Momjian
Date:
Subject: Re: Unused system table columns