Re: Comment - uniqueness of relfilenode - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: Comment - uniqueness of relfilenode
Date
Msg-id 52810A74.7050603@gmail.com
Whole thread Raw
In response to Re: Comment - uniqueness of relfilenode  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Comment - uniqueness of relfilenode  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 11/10/2013 12:57 AM, Robert Haas wrote:
> On Thu, Nov 7, 2013 at 10:56 AM, Antonin Houska
> <antonin.houska@gmail.com> wrote:
>> catalog/catalog.c:GetNewRelFileNode() and its calls indicate that the
>> following change makes sense:
>>
>>
>> diff --git a/src/include/storage/relfilenode.h
>> b/src/include/storage/relfilenode.h
>> index 75f897f..7190974 100644
>> --- a/src/include/storage/relfilenode.h
>> +++ b/src/include/storage/relfilenode.h
>> @@ -55,7 +55,7 @@ typedef enum ForkNumber
>>   * relNode identifies the specific relation.  relNode corresponds to
>>   * pg_class.relfilenode (NOT pg_class.oid, because we need to be able
>>   * to assign new physical files to relations in some situations).
>> - * Notice that relNode is only unique within a particular database.
>> + * Notice that relNode is only unique within a particular tablespace.
>>   *
>>   * Note: spcNode must be GLOBALTABLESPACE_OID if and only if dbNode is
>>   * zero.  We support shared relations only in the "global" tablespace.
>>
>>
>> // Antonin Houska (Tony)
> 
> Technically speaking, I think it's only guaranteed to be unique with a
> database-tablespace combination.  In other words, the same OID can be
> reused as a relfilenode if *either* of those two values differs.

You're right. I missed the fact that Postgres (unlike another DBMS that
I worked with) allows for tablespace to be shared across databases.

// Antonin Houska (Tony)




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Fwd: Test of Algorithm || Indexing Scheme
Next
From: Andres Freund
Date:
Subject: Re: Add %z support to elog/ereport?