mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +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:
4
src/backend/utils/cache/relcache.c
vendored
4
src/backend/utils/cache/relcache.c
vendored
@@ -6800,10 +6800,10 @@ RelationCacheInitFilePostInvalidate(void)
|
||||
void
|
||||
RelationCacheInitFileRemove(void)
|
||||
{
|
||||
const char *tblspcdir = "pg_tblspc";
|
||||
const char *tblspcdir = PG_TBLSPC_DIR;
|
||||
DIR *dir;
|
||||
struct dirent *de;
|
||||
char path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY)];
|
||||
char path[MAXPGPATH + sizeof(PG_TBLSPC_DIR) + sizeof(TABLESPACE_VERSION_DIRECTORY)];
|
||||
|
||||
snprintf(path, sizeof(path), "global/%s",
|
||||
RELCACHE_INIT_FILENAME);
|
||||
|
||||
Reference in New Issue
Block a user