diff --git a/src/bin/gs_guc/pg_guc.cpp b/src/bin/gs_guc/pg_guc.cpp index 4174952d63cfc5726fc93b9671f32e9a58e795a4..42ea97f725df5b7c313806d506f6836b3c0b7aea 100644 --- a/src/bin/gs_guc/pg_guc.cpp +++ b/src/bin/gs_guc/pg_guc.cpp @@ -1998,11 +1998,6 @@ static void do_help_generate_options(void) */ static void checkArchivepath(const char* paraValue) { - char xlogarchpath[MAXPGPATH * 2] = {'\0'}; - char* endsp = NULL; - - int rc = 0; - if (paraValue == NULL || *paraValue == 0) { write_stderr(_("%s:The archive command is empty.\n"), progname); exit(1); @@ -2014,19 +2009,6 @@ static void checkArchivepath(const char* paraValue) progname); exit(1); } - rc = snprintf_s(xlogarchpath, MAXPGPATH * 2, MAXPGPATH * 2 - 1, "%s", paraValue); - securec_check_ss_c(rc, "\0", "\0"); - - /* '%f' in archcommand */ - if ((endsp = strstr(xlogarchpath, "%f")) == NULL) { - write_stderr(_("%s:The parameter \"archive_command\" should be set with \"%%f\".\n"), progname); - exit(1); - } - /* '%p' in archcommand */ - if ((endsp = strstr(xlogarchpath, "%p")) == NULL) { - write_stderr(_("%s:The parameter \"archive_command\" should be set with \"%%p\".\n"), progname); - exit(1); - } } static bool is_file_exist(const char* path)