Go to the source code of this file.
◆ FORKNAMECHARS
◆ InvalidRelFileNumber
◆ MAX_FORKNUM
◆ OIDCHARS
#define OIDCHARS 10 /* max chars printed by %u */ |
◆ PG_TBLSPC_DIR
#define PG_TBLSPC_DIR "pg_tblspc" |
◆ PG_TBLSPC_DIR_SLASH
#define PG_TBLSPC_DIR_SLASH |
◆ RelFileNumberIsValid
◆ relpath
#define relpath |
( |
|
rlocator, |
|
|
|
forknum |
|
) |
| relpathbackend((rlocator).locator, (rlocator).backend, forknum) |
◆ relpathbackend
#define relpathbackend |
( |
|
rlocator, |
|
|
|
backend, |
|
|
|
forknum |
|
) |
| |
Value: GetRelationPath((rlocator).dbOid, (rlocator).spcOid, (rlocator).relNumber, \
backend, forknum)
char * GetRelationPath(Oid dbOid, Oid spcOid, RelFileNumber relNumber, int procNumber, ForkNumber forkNumber)
Definition at line 93 of file relpath.h.
◆ relpathperm
◆ TABLESPACE_VERSION_DIRECTORY
#define TABLESPACE_VERSION_DIRECTORY |
Value: "PG_" PG_MAJORVERSION "_" \
#define CATALOG_VERSION_NO
Definition at line 33 of file relpath.h.
◆ ForkNumber
◆ RelFileNumber
◆ ForkNumber
Enumerator |
---|
InvalidForkNumber | |
MAIN_FORKNUM | |
FSM_FORKNUM | |
VISIBILITYMAP_FORKNUM | |
INIT_FORKNUM | |
Definition at line 55 of file relpath.h.
◆ forkname_chars()
int forkname_chars |
( |
const char * |
str, |
|
|
ForkNumber * |
fork |
|
) |
| |
◆ forkname_to_number()
ForkNumber forkname_to_number |
( |
const char * |
forkName | ) |
|
Definition at line 50 of file relpath.c.
54 for (forkNum = 0; forkNum <=
MAX_FORKNUM; forkNum++)
55 if (strcmp(
forkNames[forkNum], forkName) == 0)
60 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
61 errmsg(
"invalid fork name"),
62 errhint(
"Valid fork names are \"main\", \"fsm\", "
63 "\"vm\", and \"init\".")));
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
References ereport, errcode(), errhint(), errmsg(), ERROR, forkNames, InvalidForkNumber, and MAX_FORKNUM.
Referenced by get_raw_page_fork(), get_raw_page_fork_1_9(), main(), pg_prewarm(), and pg_relation_size().
◆ GetDatabasePath()
char* GetDatabasePath |
( |
Oid |
dbOid, |
|
|
Oid |
spcOid |
|
) |
| |
Definition at line 110 of file relpath.c.
112 if (spcOid == GLOBALTABLESPACE_OID)
118 else if (spcOid == DEFAULTTABLESPACE_OID)
#define Assert(condition)
char * pstrdup(const char *in)
char * psprintf(const char *fmt,...)
#define TABLESPACE_VERSION_DIRECTORY
References Assert, PG_TBLSPC_DIR, psprintf(), pstrdup(), and TABLESPACE_VERSION_DIRECTORY.
Referenced by check_db_file_conflict(), CreateDatabaseUsingFileCopy(), CreateDatabaseUsingWalLog(), createdb(), dbase_redo(), InitPostgres(), movedb(), movedb_failure_callback(), ProcessCommittedInvalidationMessages(), relmap_redo(), remove_dbtablespaces(), and TablespaceCreateDbspace().
◆ GetRelationPath()
Definition at line 142 of file relpath.c.
147 if (spcOid == GLOBALTABLESPACE_OID)
156 path =
psprintf(
"global/%u", relNumber);
158 else if (spcOid == DEFAULTTABLESPACE_OID)
174 path =
psprintf(
"base/%u/t%d_%u_%s",
175 dbOid, procNumber, relNumber,
179 dbOid, procNumber, relNumber);
188 path =
psprintf(
"%s/%u/%s/%u/%u_%s",
202 path =
psprintf(
"%s/%u/%s/%u/t%d_%u_%s",
205 dbOid, procNumber, relNumber,
208 path =
psprintf(
"%s/%u/%s/%u/t%d_%u",
211 dbOid, procNumber, relNumber);
#define INVALID_PROC_NUMBER
References Assert, forkNames, INVALID_PROC_NUMBER, MAIN_FORKNUM, PG_TBLSPC_DIR, psprintf(), and TABLESPACE_VERSION_DIRECTORY.
Referenced by GetIncrementalFilePath().
◆ forkNames