Skip to content

Commit c237774

Browse files
committed
exclude pg_internal.init from backup
1 parent 29380ef commit c237774

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/backup.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,16 @@ parse_backup_filelist_filenames(parray *files, const char *root)
20372037
/* Check files located inside database directories */
20382038
if (filename && file->dbOid != 0)
20392039
{
2040-
if (filename[0] == 't' && isdigit(filename[1]))
2040+
if (strcmp(filename, "pg_internal.init") == 0)
2041+
{
2042+
/* Do not pg_internal.init files
2043+
* (they contain some cache entries, so it's fine) */
2044+
pgFileFree(file);
2045+
parray_remove(files, i);
2046+
i--;
2047+
continue;
2048+
}
2049+
else if (filename[0] == 't' && isdigit(filename[1]))
20412050
{
20422051
elog(VERBOSE, "temp file, filepath %s", relative);
20432052
/* Do not backup temp files */

0 commit comments

Comments
 (0)