]> granicus.if.org Git - postgresql/commitdiff
Exclude postmaster.opts from base backups
authorMagnus Hagander <magnus@hagander.net>
Sun, 16 Oct 2011 15:42:59 +0000 (17:42 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 18 Oct 2011 13:47:24 +0000 (15:47 +0200)
Noted by Fujii Masao

src/backend/replication/basebackup.c

index bcde19c71b69249a7c3902524b748a5535b0a8bb..231a1de2f5ec68996d9de0c7e346e828c78f2398 100644 (file)
@@ -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)