Skip to content

Commit dc1305c

Browse files
committed
Leave temporary files out of streaming base backups.
1 parent 0a5f119 commit dc1305c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/replication/basebackup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ sendDir(char *path, int basepathlen, bool sizeonly)
276276
if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0)
277277
continue;
278278

279+
/* Skip temporary files */
280+
if (strncmp(de->d_name,
281+
PG_TEMP_FILE_PREFIX,
282+
strlen(PG_TEMP_FILE_PREFIX)) == 0)
283+
continue;
284+
279285
snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name);
280286

281287
/* Skip postmaster.pid in the data directory */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy