提交 6ec64226 编写于 作者: A Ashwin Agrawal

pg_basebackup and pg_rewind: exclude pg_log.

This commit makes pg_rewind to exclude pg_log from performing any
operation, means comparing and copying from current primary to old
primary.

Also, it uses the new upstream style to exclude pg_log in
pg_basebackup.
上级 8d2595bd
......@@ -162,6 +162,9 @@ static const char *excludeDirContents[] =
/* Contents zeroed on startup, see StartupSUBTRANS(). */
"pg_subtrans",
/* Contents unique to each segment instance. */
"pg_log",
/* end of list */
NULL
};
......@@ -1202,20 +1205,6 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces,
continue; /* don't recurse into pg_xlog */
}
/*
* We can skip pg_log because the segment logs should be unique to
* each segment. However, include pg_log as an empty directory because
* it is required to start the segment.
*/
if (strcmp(pathbuf, "./pg_log") == 0)
{
if (!sizeonly)
_tarWriteHeader(pathbuf + basepathlen + 1, NULL, &statbuf);
size += 512; /* Size of the header just added */
continue;
}
/* Skip if client does not want */
if (match_exclude_list(pathbuf, exclude))
continue;
......
......@@ -76,6 +76,9 @@ static const char *excludeDirContents[] =
/* Contents zeroed on startup, see StartupSUBTRANS(). */
"pg_subtrans",
/* Contents unique to each segment instance. */
"pg_log",
/* end of list */
NULL
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册