aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2011-10-16 17:42:59 +0200
committerMagnus Hagander <magnus@hagander.net>2011-10-18 15:47:24 +0200
commit8c1501b292895bb883eaf6663934e9f7c45b043d (patch)
tree850343e0a1b588164310b8abbd7c8b59b9c7ffa0 /src
parent1004f4bb876d10857508a9ab65131f96e24a4658 (diff)
downloadpostgresql-8c1501b292895bb883eaf6663934e9f7c45b043d.tar.gz
postgresql-8c1501b292895bb883eaf6663934e9f7c45b043d.zip
Exclude postmaster.opts from base backups
Noted by Fujii Masao
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/basebackup.c5
1 files 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)