mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Skip temp tables from basebackup.
Do not store temp tables in basebackup, they will not be visible anyway, so, there are not reasons to store them. Author: David Steel Reviewed by: me Discussion: https://www.postgresql.org/message-id/flat/5ea4d26a-a453-c1b7-eff9-5a3ef8f8aceb@pgmasters.net
This commit is contained in:
@ -1072,6 +1072,16 @@ sendDir(const char *path, int basepathlen, bool sizeonly, List *tablespaces,
|
||||
}
|
||||
}
|
||||
|
||||
/* Exclude temporary relations */
|
||||
if (isDbDir && looks_like_temp_rel_name(de->d_name))
|
||||
{
|
||||
elog(DEBUG2,
|
||||
"temporary relation file \"%s\" excluded from backup",
|
||||
de->d_name);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, de->d_name);
|
||||
|
||||
/* Skip pg_control here to back up it last */
|
||||
|
Reference in New Issue
Block a user