Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5024044

Browse files
committed
C comments: improve description of relfilenode uniqueness
Report by Antonin Houska
1 parent 11d205e commit 5024044

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/backend/catalog/catalog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
408408

409409
/*
410410
* GetNewRelFileNode
411-
* Generate a new relfilenode number that is unique within the given
412-
* tablespace.
411+
* Generate a new relfilenode number that is unique within the
412+
* database of the given tablespace.
413413
*
414414
* If the relfilenode will also be used as the relation's OID, pass the
415415
* opened pg_class catalog, and this routine will guarantee that the result

src/backend/commands/tablecmds.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -9078,8 +9078,8 @@ ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode)
90789078
FlushRelationBuffers(rel);
90799079

90809080
/*
9081-
* Relfilenodes are not unique across tablespaces, so we need to allocate
9082-
* a new one in the new tablespace.
9081+
* Relfilenodes are not unique in databases across tablespaces, so we
9082+
* need to allocate a new one in the new tablespace.
90839083
*/
90849084
newrelfilenode = GetNewRelFileNode(newTableSpace, NULL,
90859085
rel->rd_rel->relpersistence);

src/include/storage/relfilenode.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ typedef enum ForkNumber
5555
* relNode identifies the specific relation. relNode corresponds to
5656
* pg_class.relfilenode (NOT pg_class.oid, because we need to be able
5757
* to assign new physical files to relations in some situations).
58-
* Notice that relNode is only unique within a particular tablespace.
58+
* Notice that relNode is only unique within a database in a particular
59+
* tablespace.
5960
*
6061
* Note: spcNode must be GLOBALTABLESPACE_OID if and only if dbNode is
6162
* zero. We support shared relations only in the "global" tablespace.

0 commit comments

Comments
 (0)