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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy