postgres.git / summary / log / commit / refs
commit 8c1501b292895bb883eaf6663934e9f7c45b043d
Author: Magnus Hagander <magnus@hagander.net>
Date: Sun Oct 16 15:42:59 2011 +0000
First released in: 9.2.0, 9.1.2
Exclude postmaster.opts from base backups
Noted by Fujii Masao
src/backend/replication/basebackup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index bcde19c71b6..231a1de2f5e 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -577,8 +577,9 @@ sendDir(char *path, int basepathlen, bool sizeonly)
snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name);
- /* Skip postmaster.pid in the data directory */
- if (strcmp(pathbuf, "./postmaster.pid") == 0)
+ /* Skip postmaster.pid and postmaster.opts in the data directory */
+ if (strcmp(pathbuf, "./postmaster.pid") == 0 ||
+ strcmp(pathbuf, "./postmaster.opts") == 0)
continue;
if (lstat(pathbuf, &statbuf) != 0)
[parent: 1004f4bb876d]