Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c7cd2d6

Browse files
committed
Define PG_TBLSPC_DIR for path pg_tblspc/ in data folder
Similarly to 2065ddf, 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
1 parent 94eec79 commit c7cd2d6

File tree

18 files changed

+88
-70
lines changed

18 files changed

+88
-70
lines changed

src/backend/access/transam/xlog.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,10 +8944,10 @@ do_pg_backup_start(const char *backupidstr, bool fast, List **tablespaces,
89448944
datadirpathlen = strlen(DataDir);
89458945

89468946
/* Collect information about all tablespaces */
8947-
tblspcdir = AllocateDir("pg_tblspc");
8948-
while ((de = ReadDir(tblspcdir, "pg_tblspc")) != NULL)
8947+
tblspcdir = AllocateDir(PG_TBLSPC_DIR);
8948+
while ((de = ReadDir(tblspcdir, PG_TBLSPC_DIR)) != NULL)
89498949
{
8950-
char fullpath[MAXPGPATH + 10];
8950+
char fullpath[MAXPGPATH + sizeof(PG_TBLSPC_DIR)];
89518951
char linkpath[MAXPGPATH];
89528952
char *relpath = NULL;
89538953
char *s;
@@ -8970,7 +8970,7 @@ do_pg_backup_start(const char *backupidstr, bool fast, List **tablespaces,
89708970
if (*badp != '\0' || errno == EINVAL || errno == ERANGE)
89718971
continue;
89728972

8973-
snprintf(fullpath, sizeof(fullpath), "pg_tblspc/%s", de->d_name);
8973+
snprintf(fullpath, sizeof(fullpath), "%s/%s", PG_TBLSPC_DIR, de->d_name);
89748974

89758975
de_type = get_dirent_type(fullpath, de, false, ERROR);
89768976

@@ -9031,8 +9031,8 @@ do_pg_backup_start(const char *backupidstr, bool fast, List **tablespaces,
90319031
* In this case, we store a relative path rather than an
90329032
* absolute path into the tablespaceinfo.
90339033
*/
9034-
snprintf(linkpath, sizeof(linkpath), "pg_tblspc/%s",
9035-
de->d_name);
9034+
snprintf(linkpath, sizeof(linkpath), "%s/%s",
9035+
PG_TBLSPC_DIR, de->d_name);
90369036
relpath = pstrdup(linkpath);
90379037
}
90389038
else

src/backend/access/transam/xlogrecovery.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
677677
tablespaceinfo *ti = lfirst(lc);
678678
char *linkloc;
679679

680-
linkloc = psprintf("pg_tblspc/%u", ti->oid);
680+
linkloc = psprintf("%s/%u", PG_TBLSPC_DIR, ti->oid);
681681

682682
/*
683683
* Remove the existing symlink if any and Create the symlink
@@ -2157,23 +2157,24 @@ CheckTablespaceDirectory(void)
21572157
DIR *dir;
21582158
struct dirent *de;
21592159

2160-
dir = AllocateDir("pg_tblspc");
2161-
while ((de = ReadDir(dir, "pg_tblspc")) != NULL)
2160+
dir = AllocateDir(PG_TBLSPC_DIR);
2161+
while ((de = ReadDir(dir, PG_TBLSPC_DIR)) != NULL)
21622162
{
2163-
char path[MAXPGPATH + 10];
2163+
char path[MAXPGPATH + sizeof(PG_TBLSPC_DIR)];
21642164

21652165
/* Skip entries of non-oid names */
21662166
if (strspn(de->d_name, "0123456789") != strlen(de->d_name))
21672167
continue;
21682168

2169-
snprintf(path, sizeof(path), "pg_tblspc/%s", de->d_name);
2169+
snprintf(path, sizeof(path), "%s/%s", PG_TBLSPC_DIR, de->d_name);
21702170

21712171
if (get_dirent_type(path, de, false, ERROR) != PGFILETYPE_LNK)
21722172
ereport(allow_in_place_tablespaces ? WARNING : PANIC,
21732173
(errcode(ERRCODE_DATA_CORRUPTED),
21742174
errmsg("unexpected directory entry \"%s\" found in %s",
2175-
de->d_name, "pg_tblspc/"),
2176-
errdetail("All directory entries in pg_tblspc/ should be symbolic links."),
2175+
de->d_name, PG_TBLSPC_DIR),
2176+
errdetail("All directory entries in %s/ should be symbolic links.",
2177+
PG_TBLSPC_DIR),
21772178
errhint("Remove those directories, or set \"allow_in_place_tablespaces\" to ON transiently to let recovery complete.")));
21782179
}
21792180
}

src/backend/backup/backup_manifest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "access/xlog.h"
1717
#include "backup/backup_manifest.h"
1818
#include "backup/basebackup_sink.h"
19+
#include "common/relpath.h"
1920
#include "mb/pg_wchar.h"
2021
#include "utils/builtins.h"
2122
#include "utils/json.h"
@@ -117,7 +118,7 @@ AddFileToBackupManifest(backup_manifest_info *manifest, Oid spcoid,
117118
*/
118119
if (OidIsValid(spcoid))
119120
{
120-
snprintf(pathbuf, sizeof(pathbuf), "pg_tblspc/%u/%s", spcoid,
121+
snprintf(pathbuf, sizeof(pathbuf), "%s/%u/%s", PG_TBLSPC_DIR, spcoid,
121122
pathname);
122123
pathname = pathbuf;
123124
}

src/backend/backup/basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly,
14881488
if (OidIsValid(spcoid))
14891489
{
14901490
relspcoid = spcoid;
1491-
lookup_path = psprintf("pg_tblspc/%u/%s", spcoid,
1491+
lookup_path = psprintf("%s/%u/%s", PG_TBLSPC_DIR, spcoid,
14921492
tarfilename);
14931493
}
14941494
else

src/backend/commands/dbcommands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3257,7 +3257,7 @@ recovery_create_dbdir(char *path, bool only_tblspc)
32573257
if (stat(path, &st) == 0)
32583258
return;
32593259

3260-
if (only_tblspc && strstr(path, "pg_tblspc/") == NULL)
3260+
if (only_tblspc && strstr(path, PG_TBLSPC_DIR_SLASH) == NULL)
32613261
elog(PANIC, "requested to created invalid directory: %s", path);
32623262

32633263
if (reachedConsistency && !allow_in_place_tablespaces)

src/backend/commands/tablespace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ create_tablespace_directories(const char *location, const Oid tablespaceoid)
576576
struct stat st;
577577
bool in_place;
578578

579-
linkloc = psprintf("pg_tblspc/%u", tablespaceoid);
579+
linkloc = psprintf("%s/%u", PG_TBLSPC_DIR, tablespaceoid);
580580

581581
/*
582582
* If we're asked to make an 'in place' tablespace, create the directory
@@ -692,7 +692,7 @@ destroy_tablespace_directories(Oid tablespaceoid, bool redo)
692692
char *subfile;
693693
struct stat st;
694694

695-
linkloc_with_version_dir = psprintf("pg_tblspc/%u/%s", tablespaceoid,
695+
linkloc_with_version_dir = psprintf("%s/%u/%s", PG_TBLSPC_DIR, tablespaceoid,
696696
TABLESPACE_VERSION_DIRECTORY);
697697

698698
/*

src/backend/storage/file/fd.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,8 +1790,8 @@ TempTablespacePath(char *path, Oid tablespace)
17901790
else
17911791
{
17921792
/* All other tablespaces are accessed via symlinks */
1793-
snprintf(path, MAXPGPATH, "pg_tblspc/%u/%s/%s",
1794-
tablespace, TABLESPACE_VERSION_DIRECTORY,
1793+
snprintf(path, MAXPGPATH, "%s/%u/%s/%s",
1794+
PG_TBLSPC_DIR, tablespace, TABLESPACE_VERSION_DIRECTORY,
17951795
PG_TEMP_FILES_DIR);
17961796
}
17971797
}
@@ -3296,7 +3296,7 @@ CleanupTempFiles(bool isCommit, bool isProcExit)
32963296
void
32973297
RemovePgTempFiles(void)
32983298
{
3299-
char temp_path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY) + sizeof(PG_TEMP_FILES_DIR)];
3299+
char temp_path[MAXPGPATH + sizeof(PG_TBLSPC_DIR) + sizeof(TABLESPACE_VERSION_DIRECTORY) + sizeof(PG_TEMP_FILES_DIR)];
33003300
DIR *spc_dir;
33013301
struct dirent *spc_de;
33023302

@@ -3310,20 +3310,21 @@ RemovePgTempFiles(void)
33103310
/*
33113311
* Cycle through temp directories for all non-default tablespaces.
33123312
*/
3313-
spc_dir = AllocateDir("pg_tblspc");
3313+
spc_dir = AllocateDir(PG_TBLSPC_DIR);
33143314

3315-
while ((spc_de = ReadDirExtended(spc_dir, "pg_tblspc", LOG)) != NULL)
3315+
while ((spc_de = ReadDirExtended(spc_dir, PG_TBLSPC_DIR, LOG)) != NULL)
33163316
{
33173317
if (strcmp(spc_de->d_name, ".") == 0 ||
33183318
strcmp(spc_de->d_name, "..") == 0)
33193319
continue;
33203320

3321-
snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s/%s",
3322-
spc_de->d_name, TABLESPACE_VERSION_DIRECTORY, PG_TEMP_FILES_DIR);
3321+
snprintf(temp_path, sizeof(temp_path), "%s/%s/%s/%s",
3322+
PG_TBLSPC_DIR, spc_de->d_name, TABLESPACE_VERSION_DIRECTORY,
3323+
PG_TEMP_FILES_DIR);
33233324
RemovePgTempFilesInDir(temp_path, true, false);
33243325

3325-
snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s",
3326-
spc_de->d_name, TABLESPACE_VERSION_DIRECTORY);
3326+
snprintf(temp_path, sizeof(temp_path), "%s/%s/%s",
3327+
PG_TBLSPC_DIR, spc_de->d_name, TABLESPACE_VERSION_DIRECTORY);
33273328
RemovePgTempRelationFiles(temp_path);
33283329
}
33293330

@@ -3610,15 +3611,15 @@ SyncDataDirectory(void)
36103611
/* Sync the top level pgdata directory. */
36113612
do_syncfs(".");
36123613
/* If any tablespaces are configured, sync each of those. */
3613-
dir = AllocateDir("pg_tblspc");
3614-
while ((de = ReadDirExtended(dir, "pg_tblspc", LOG)))
3614+
dir = AllocateDir(PG_TBLSPC_DIR);
3615+
while ((de = ReadDirExtended(dir, PG_TBLSPC_DIR, LOG)))
36153616
{
36163617
char path[MAXPGPATH];
36173618

36183619
if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0)
36193620
continue;
36203621

3621-
snprintf(path, MAXPGPATH, "pg_tblspc/%s", de->d_name);
3622+
snprintf(path, MAXPGPATH, "%s/%s", PG_TBLSPC_DIR, de->d_name);
36223623
do_syncfs(path);
36233624
}
36243625
FreeDir(dir);
@@ -3641,7 +3642,7 @@ SyncDataDirectory(void)
36413642
walkdir(".", pre_sync_fname, false, DEBUG1);
36423643
if (xlog_is_symlink)
36433644
walkdir("pg_wal", pre_sync_fname, false, DEBUG1);
3644-
walkdir("pg_tblspc", pre_sync_fname, true, DEBUG1);
3645+
walkdir(PG_TBLSPC_DIR, pre_sync_fname, true, DEBUG1);
36453646
#endif
36463647

36473648
/* Prepare to report progress syncing the data directory via fsync. */
@@ -3659,7 +3660,7 @@ SyncDataDirectory(void)
36593660
walkdir(".", datadir_fsync_fname, false, LOG);
36603661
if (xlog_is_symlink)
36613662
walkdir("pg_wal", datadir_fsync_fname, false, LOG);
3662-
walkdir("pg_tblspc", datadir_fsync_fname, true, LOG);
3663+
walkdir(PG_TBLSPC_DIR, datadir_fsync_fname, true, LOG);
36633664
}
36643665

36653666
/*

src/backend/storage/file/reinit.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ typedef struct
4646
void
4747
ResetUnloggedRelations(int op)
4848
{
49-
char temp_path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY)];
49+
char temp_path[MAXPGPATH + sizeof(PG_TBLSPC_DIR) + sizeof(TABLESPACE_VERSION_DIRECTORY)];
5050
DIR *spc_dir;
5151
struct dirent *spc_de;
5252
MemoryContext tmpctx,
@@ -77,16 +77,16 @@ ResetUnloggedRelations(int op)
7777
/*
7878
* Cycle through directories for all non-default tablespaces.
7979
*/
80-
spc_dir = AllocateDir("pg_tblspc");
80+
spc_dir = AllocateDir(PG_TBLSPC_DIR);
8181

82-
while ((spc_de = ReadDir(spc_dir, "pg_tblspc")) != NULL)
82+
while ((spc_de = ReadDir(spc_dir, PG_TBLSPC_DIR)) != NULL)
8383
{
8484
if (strcmp(spc_de->d_name, ".") == 0 ||
8585
strcmp(spc_de->d_name, "..") == 0)
8686
continue;
8787

88-
snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s",
89-
spc_de->d_name, TABLESPACE_VERSION_DIRECTORY);
88+
snprintf(temp_path, sizeof(temp_path), "%s/%s/%s",
89+
PG_TBLSPC_DIR, spc_de->d_name, TABLESPACE_VERSION_DIRECTORY);
9090
ResetUnloggedRelationsInTablespaceDir(temp_path, op);
9191
}
9292

src/backend/utils/adt/dbsize.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ calculate_database_size(Oid dbOid)
143143
totalsize = db_dir_size(pathname);
144144

145145
/* Scan the non-default tablespaces */
146-
snprintf(dirpath, MAXPGPATH, "pg_tblspc");
146+
snprintf(dirpath, MAXPGPATH, PG_TBLSPC_DIR);
147147
dirdesc = AllocateDir(dirpath);
148148

149149
while ((direntry = ReadDir(dirdesc, dirpath)) != NULL)
@@ -154,8 +154,8 @@ calculate_database_size(Oid dbOid)
154154
strcmp(direntry->d_name, "..") == 0)
155155
continue;
156156

157-
snprintf(pathname, sizeof(pathname), "pg_tblspc/%s/%s/%u",
158-
direntry->d_name, TABLESPACE_VERSION_DIRECTORY, dbOid);
157+
snprintf(pathname, sizeof(pathname), "%s/%s/%s/%u",
158+
PG_TBLSPC_DIR, direntry->d_name, TABLESPACE_VERSION_DIRECTORY, dbOid);
159159
totalsize += db_dir_size(pathname);
160160
}
161161

@@ -227,7 +227,7 @@ calculate_tablespace_size(Oid tblspcOid)
227227
else if (tblspcOid == GLOBALTABLESPACE_OID)
228228
snprintf(tblspcPath, MAXPGPATH, "global");
229229
else
230-
snprintf(tblspcPath, MAXPGPATH, "pg_tblspc/%u/%s", tblspcOid,
230+
snprintf(tblspcPath, MAXPGPATH, "%s/%u/%s", PG_TBLSPC_DIR, tblspcOid,
231231
TABLESPACE_VERSION_DIRECTORY);
232232

233233
dirdesc = AllocateDir(tblspcPath);

src/backend/utils/adt/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pg_tablespace_databases(PG_FUNCTION_ARGS)
242242
if (tablespaceOid == DEFAULTTABLESPACE_OID)
243243
location = "base";
244244
else
245-
location = psprintf("pg_tblspc/%u/%s", tablespaceOid,
245+
location = psprintf("%s/%u/%s", PG_TBLSPC_DIR, tablespaceOid,
246246
TABLESPACE_VERSION_DIRECTORY);
247247

248248
dirdesc = AllocateDir(location);
@@ -325,7 +325,7 @@ pg_tablespace_location(PG_FUNCTION_ARGS)
325325
* Find the location of the tablespace by reading the symbolic link that
326326
* is in pg_tblspc/<oid>.
327327
*/
328-
snprintf(sourcepath, sizeof(sourcepath), "pg_tblspc/%u", tablespaceOid);
328+
snprintf(sourcepath, sizeof(sourcepath), "%s/%u", PG_TBLSPC_DIR, tablespaceOid);
329329

330330
/*
331331
* Before reading the link, check if the source path is a link or a

src/backend/utils/cache/relcache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6800,10 +6800,10 @@ RelationCacheInitFilePostInvalidate(void)
68006800
void
68016801
RelationCacheInitFileRemove(void)
68026802
{
6803-
const char *tblspcdir = "pg_tblspc";
6803+
const char *tblspcdir = PG_TBLSPC_DIR;
68046804
DIR *dir;
68056805
struct dirent *de;
6806-
char path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY)];
6806+
char path[MAXPGPATH + sizeof(PG_TBLSPC_DIR) + sizeof(TABLESPACE_VERSION_DIRECTORY)];
68076807

68086808
snprintf(path, sizeof(path), "global/%s",
68096809
RELCACHE_INIT_FILENAME);

src/bin/pg_checksums/pg_checksums.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ scan_directory(const char *basedir, const char *subdir, bool sizeonly)
388388
* is valid, resolving the linked locations and dive into them
389389
* directly.
390390
*/
391-
if (strncmp("pg_tblspc", subdir, strlen("pg_tblspc")) == 0)
391+
if (strncmp(PG_TBLSPC_DIR, subdir, strlen(PG_TBLSPC_DIR)) == 0)
392392
{
393393
char tblspc_path[MAXPGPATH];
394394
struct stat tblspc_st;
@@ -593,12 +593,12 @@ main(int argc, char *argv[])
593593
{
594594
total_size = scan_directory(DataDir, "global", true);
595595
total_size += scan_directory(DataDir, "base", true);
596-
total_size += scan_directory(DataDir, "pg_tblspc", true);
596+
total_size += scan_directory(DataDir, PG_TBLSPC_DIR, true);
597597
}
598598

599599
(void) scan_directory(DataDir, "global", false);
600600
(void) scan_directory(DataDir, "base", false);
601-
(void) scan_directory(DataDir, "pg_tblspc", false);
601+
(void) scan_directory(DataDir, PG_TBLSPC_DIR, false);
602602

603603
if (showprogress)
604604
progress_report(true);

src/bin/pg_combinebackup/pg_combinebackup.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ main(int argc, char *argv[])
373373
{
374374
char linkpath[MAXPGPATH];
375375

376-
snprintf(linkpath, MAXPGPATH, "%s/pg_tblspc/%u", opt.output,
376+
snprintf(linkpath, MAXPGPATH, "%s/%s/%u", opt.output, PG_TBLSPC_DIR,
377377
ts->oid);
378378

379379
if (opt.dry_run)
@@ -867,12 +867,12 @@ process_directory_recursively(Oid tsoid,
867867
is_incremental_dir = true;
868868
else if (relative_path != NULL)
869869
{
870-
is_pg_tblspc = strcmp(relative_path, "pg_tblspc") == 0;
870+
is_pg_tblspc = strcmp(relative_path, PG_TBLSPC_DIR) == 0;
871871
is_pg_wal = (strcmp(relative_path, "pg_wal") == 0 ||
872872
strncmp(relative_path, "pg_wal/", 7) == 0);
873873
is_incremental_dir = strncmp(relative_path, "base/", 5) == 0 ||
874874
strcmp(relative_path, "global") == 0 ||
875-
strncmp(relative_path, "pg_tblspc/", 10) == 0;
875+
strncmp(relative_path, PG_TBLSPC_DIR_SLASH, 10) == 0;
876876
}
877877

878878
/*
@@ -895,7 +895,7 @@ process_directory_recursively(Oid tsoid,
895895
strlcpy(ifulldir, input_directory, MAXPGPATH);
896896
strlcpy(ofulldir, output_directory, MAXPGPATH);
897897
if (OidIsValid(tsoid))
898-
snprintf(manifest_prefix, MAXPGPATH, "pg_tblspc/%u/", tsoid);
898+
snprintf(manifest_prefix, MAXPGPATH, "%s/%u/", PG_TBLSPC_DIR, tsoid);
899899
else
900900
manifest_prefix[0] = '\0';
901901
}
@@ -906,8 +906,8 @@ process_directory_recursively(Oid tsoid,
906906
snprintf(ofulldir, MAXPGPATH, "%s/%s", output_directory,
907907
relative_path);
908908
if (OidIsValid(tsoid))
909-
snprintf(manifest_prefix, MAXPGPATH, "pg_tblspc/%u/%s/",
910-
tsoid, relative_path);
909+
snprintf(manifest_prefix, MAXPGPATH, "%s/%u/%s/",
910+
PG_TBLSPC_DIR, tsoid, relative_path);
911911
else
912912
snprintf(manifest_prefix, MAXPGPATH, "%s/", relative_path);
913913
}
@@ -1249,7 +1249,7 @@ scan_for_existing_tablespaces(char *pathname, cb_options *opt)
12491249
struct dirent *de;
12501250
cb_tablespace *tslist = NULL;
12511251

1252-
snprintf(pg_tblspc, MAXPGPATH, "%s/pg_tblspc", pathname);
1252+
snprintf(pg_tblspc, MAXPGPATH, "%s/%s", pathname, PG_TBLSPC_DIR);
12531253
pg_log_debug("scanning \"%s\"", pg_tblspc);
12541254

12551255
if ((dir = opendir(pg_tblspc)) == NULL)
@@ -1344,8 +1344,8 @@ scan_for_existing_tablespaces(char *pathname, cb_options *opt)
13441344
* we just record the paths within the data directories.
13451345
*/
13461346
snprintf(ts->old_dir, MAXPGPATH, "%s/%s", pg_tblspc, de->d_name);
1347-
snprintf(ts->new_dir, MAXPGPATH, "%s/pg_tblspc/%s", opt->output,
1348-
de->d_name);
1347+
snprintf(ts->new_dir, MAXPGPATH, "%s/%s/%s", opt->output,
1348+
PG_TBLSPC_DIR, de->d_name);
13491349
ts->in_place = true;
13501350
}
13511351

src/bin/pg_rewind/file_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ recurse_dir(const char *datadir, const char *parentpath,
452452
* to process all the tablespaces. We also follow a symlink if
453453
* it's for pg_wal. Symlinks elsewhere are ignored.
454454
*/
455-
if ((parentpath && strcmp(parentpath, "pg_tblspc") == 0) ||
455+
if ((parentpath && strcmp(parentpath, PG_TBLSPC_DIR) == 0) ||
456456
strcmp(path, "pg_wal") == 0)
457457
recurse_dir(datadir, path, callback);
458458
}

0 commit comments

Comments
 (0)