summaryrefslogtreecommitdiff
path: root/src/include/common
diff options
context:
space:
mode:
authorMichael Paquier2024-09-03 00:11:54 +0000
committerMichael Paquier2024-09-03 00:11:54 +0000
commitc7cd2d6ed082a4638172acece33ed6f36da96263 (patch)
treef4a8ab1b49eac09019d6b6a6114e9d9a00e9f1a8 /src/include/common
parent94eec79633f284488de69e253857e44aad10c730 (diff)
Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder
Similarly to 2065ddf5e34c, this introduces a define for "pg_tblspc". This makes the style more consistent with the existing PG_STAT_TMP_DIR, for example. There is a difference with the other cases with the introduction of PG_TBLSPC_DIR_SLASH, required in two places for recovery and backups. Author: Bertrand Drouvot Reviewed-by: Ashutosh Bapat, Álvaro Herrera, Yugo Nagata, Michael Paquier Discussion: https://postgr.es/m/ZryVvjqS9SnV1GPP@ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src/include/common')
-rw-r--r--src/include/common/relpath.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/common/relpath.h b/src/include/common/relpath.h
index 6f006d5a938..2dabbe01ecd 100644
--- a/src/include/common/relpath.h
+++ b/src/include/common/relpath.h
@@ -33,6 +33,15 @@ typedef Oid RelFileNumber;
#define TABLESPACE_VERSION_DIRECTORY "PG_" PG_MAJORVERSION "_" \
CppAsString2(CATALOG_VERSION_NO)
+/*
+ * Tablespace path (relative to installation's $PGDATA).
+ *
+ * These values should not be changed as many tools rely on it.
+ */
+#define PG_TBLSPC_DIR "pg_tblspc"
+#define PG_TBLSPC_DIR_SLASH "pg_tblspc/" /* required for strings
+ * comparisons */
+
/* Characters to allow for an OID in a relation path */
#define OIDCHARS 10 /* max chars printed by %u */