C comments: improve description of relfilenode uniqueness
Report by Antonin Houska
This commit is contained in:
parent
11d205e2bd
commit
5024044a20
3 changed files with 6 additions and 5 deletions
|
@ -408,8 +408,8 @@ GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetNewRelFileNode
|
* GetNewRelFileNode
|
||||||
* Generate a new relfilenode number that is unique within the given
|
* Generate a new relfilenode number that is unique within the
|
||||||
* tablespace.
|
* database of the given tablespace.
|
||||||
*
|
*
|
||||||
* If the relfilenode will also be used as the relation's OID, pass the
|
* If the relfilenode will also be used as the relation's OID, pass the
|
||||||
* opened pg_class catalog, and this routine will guarantee that the result
|
* opened pg_class catalog, and this routine will guarantee that the result
|
||||||
|
|
|
@ -9078,8 +9078,8 @@ ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode)
|
||||||
FlushRelationBuffers(rel);
|
FlushRelationBuffers(rel);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Relfilenodes are not unique across tablespaces, so we need to allocate
|
* Relfilenodes are not unique in databases across tablespaces, so we
|
||||||
* a new one in the new tablespace.
|
* need to allocate a new one in the new tablespace.
|
||||||
*/
|
*/
|
||||||
newrelfilenode = GetNewRelFileNode(newTableSpace, NULL,
|
newrelfilenode = GetNewRelFileNode(newTableSpace, NULL,
|
||||||
rel->rd_rel->relpersistence);
|
rel->rd_rel->relpersistence);
|
||||||
|
|
|
@ -55,7 +55,8 @@ typedef enum ForkNumber
|
||||||
* relNode identifies the specific relation. relNode corresponds to
|
* relNode identifies the specific relation. relNode corresponds to
|
||||||
* pg_class.relfilenode (NOT pg_class.oid, because we need to be able
|
* pg_class.relfilenode (NOT pg_class.oid, because we need to be able
|
||||||
* to assign new physical files to relations in some situations).
|
* to assign new physical files to relations in some situations).
|
||||||
* Notice that relNode is only unique within a particular tablespace.
|
* Notice that relNode is only unique within a database in a particular
|
||||||
|
* tablespace.
|
||||||
*
|
*
|
||||||
* Note: spcNode must be GLOBALTABLESPACE_OID if and only if dbNode is
|
* Note: spcNode must be GLOBALTABLESPACE_OID if and only if dbNode is
|
||||||
* zero. We support shared relations only in the "global" tablespace.
|
* zero. We support shared relations only in the "global" tablespace.
|
||||||
|
|
Loading…
Reference in a new issue