mirror of
https://github.com/postgres/postgres.git
synced 2025-09-08 00:47:37 +03:00
Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder
Similarly to 2065ddf5e3
, 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
This commit is contained in:
@@ -576,7 +576,7 @@ create_tablespace_directories(const char *location, const Oid tablespaceoid)
|
||||
struct stat st;
|
||||
bool in_place;
|
||||
|
||||
linkloc = psprintf("pg_tblspc/%u", tablespaceoid);
|
||||
linkloc = psprintf("%s/%u", PG_TBLSPC_DIR, tablespaceoid);
|
||||
|
||||
/*
|
||||
* If we're asked to make an 'in place' tablespace, create the directory
|
||||
@@ -692,7 +692,7 @@ destroy_tablespace_directories(Oid tablespaceoid, bool redo)
|
||||
char *subfile;
|
||||
struct stat st;
|
||||
|
||||
linkloc_with_version_dir = psprintf("pg_tblspc/%u/%s", tablespaceoid,
|
||||
linkloc_with_version_dir = psprintf("%s/%u/%s", PG_TBLSPC_DIR, tablespaceoid,
|
||||
TABLESPACE_VERSION_DIRECTORY);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user