Commit dc1305ce authored by Heikki Linnakangas's avatar Heikki Linnakangas

Leave temporary files out of streaming base backups.

parent 0a5f1199
...@@ -276,6 +276,12 @@ sendDir(char *path, int basepathlen, bool sizeonly) ...@@ -276,6 +276,12 @@ sendDir(char *path, int basepathlen, bool sizeonly)
if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0)
continue; continue;
/* Skip temporary files */
if (strncmp(de->d_name,
PG_TEMP_FILE_PREFIX,
strlen(PG_TEMP_FILE_PREFIX)) == 0)
continue;
snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name); snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name);
/* Skip postmaster.pid in the data directory */ /* Skip postmaster.pid in the data directory */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment