重建备机时不删除覆盖 postgresql.conf.bak 与 postgresql.conf.guc.bak 文件
This commit is contained in:
@ -1433,6 +1433,7 @@ static void DeleteSubDataDir(const char* dirname)
|
||||
} else if (S_ISREG(st.st_mode)) {
|
||||
if (strcmp(de->d_name, "postgresql.conf") == 0 || strcmp(de->d_name, "pg_ctl.lock") == 0 ||
|
||||
strcmp(de->d_name, "postgresql.conf.lock") == 0 || strcmp(de->d_name, "postgresql.conf.bak.old") == 0 ||
|
||||
strcmp(de->d_name, "postgresql.conf.bak") == 0 || strcmp(de->d_name, "postgresql.conf.guc.bak") == 0 ||
|
||||
strcmp(de->d_name, "build_completed.start") == 0 || strcmp(de->d_name, "gs_build.pid") == 0 ||
|
||||
strcmp(de->d_name, "postmaster.opts") == 0 || strcmp(de->d_name, "gaussdb.state") == 0 ||
|
||||
strcmp(de->d_name, "disc_readonly_test") == 0 || strcmp(de->d_name, ssl_cert_file) == 0 ||
|
||||
|
@ -1433,6 +1433,7 @@ static int64 sendDir(const char *path, int basepathlen, bool sizeonly, List *tab
|
||||
/* For gs_backup, we should not skip these files */
|
||||
if (strcmp(pathbuf, "./pg_ctl.lock") == 0 || strcmp(pathbuf, "./postgresql.conf.lock") == 0 ||
|
||||
strcmp(pathbuf, "./postgresql.conf.bak") == 0 || strcmp(pathbuf, "./postgresql.conf") == 0 ||
|
||||
strcmp(de->d_name, "postgresql.conf.guc.bak") == 0 ||
|
||||
strcmp(pathbuf, "./postgresql.conf.bak.old") == 0) {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user