Skip to content

Commit c8909b8

Browse files
committed
Fix warning in get_backup_filelist
pg_multixact contains files which looks like db files, but they are not. get_backup_filelist should not pass to set_forkname files not in db folder nor `global` folder.
1 parent 92a4d56 commit c8909b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/catalog.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,10 @@ get_backup_filelist(pgBackup *backup, bool strict)
11421142
if (!file->is_datafile || file->is_cfs)
11431143
file->size = file->uncompressed_size;
11441144

1145-
if (file->external_dir_num == 0 && S_ISREG(file->mode))
1145+
if (file->external_dir_num == 0 &&
1146+
(file->dbOid != 0 ||
1147+
path_is_prefix_of_path("global", file->rel_path)) &&
1148+
S_ISREG(file->mode))
11461149
{
11471150
bool is_datafile = file->is_datafile;
11481151
set_forkname(file);

0 commit comments

Comments
 (0)