Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c1501b

Browse files
committed
Exclude postmaster.opts from base backups
Noted by Fujii Masao
1 parent 1004f4b commit 8c1501b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/replication/basebackup.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,9 @@ sendDir(char *path, int basepathlen, bool sizeonly)
577577

578578
snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name);
579579

580-
/* Skip postmaster.pid in the data directory */
581-
if (strcmp(pathbuf, "./postmaster.pid") == 0)
580+
/* Skip postmaster.pid and postmaster.opts in the data directory */
581+
if (strcmp(pathbuf, "./postmaster.pid") == 0 ||
582+
strcmp(pathbuf, "./postmaster.opts") == 0)
582583
continue;
583584

584585
if (lstat(pathbuf, &statbuf) != 0)

0 commit comments

Comments
 (0)