diff options
Diffstat (limited to 'src/bin/pg_basebackup/pg_receivewal.c')
-rw-r--r-- | src/bin/pg_basebackup/pg_receivewal.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 63207ca025e..c7a46b8a2ab 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -57,8 +57,6 @@ static XLogRecPtr endpos = InvalidXLogRecPtr; static void usage(void); -static void parse_compress_options(char *option, char **algorithm, - char **detail); static DIR *get_destination_dir(char *dest_folder); static void close_destination_dir(DIR *dest_dir, char *dest_folder); static XLogRecPtr FindStreamingStart(uint32 *tli); @@ -109,65 +107,6 @@ usage(void) printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } -/* - * Basic parsing of a value specified for -Z/--compress - * - * The parsing consists of a METHOD:DETAIL string fed later on to a more - * advanced routine in charge of proper validation checks. This only extracts - * METHOD and DETAIL. If only an integer is found, the method is implied by - * the value specified. - */ -static void -parse_compress_options(char *option, char **algorithm, char **detail) -{ - char *sep; - char *endp; - long result; - - /* - * Check whether the compression specification consists of a bare integer. - * - * For backward-compatibility, assume "none" if the integer found is zero - * and "gzip" otherwise. - */ - result = strtol(option, &endp, 10); - if (*endp == '\0') - { - if (result == 0) - { - *algorithm = pstrdup("none"); - *detail = NULL; - } - else - { - *algorithm = pstrdup("gzip"); - *detail = pstrdup(option); - } - return; - } - - /* - * Check whether there is a compression detail following the algorithm - * name. - */ - sep = strchr(option, ':'); - if (sep == NULL) - { - *algorithm = pstrdup(option); - *detail = NULL; - } - else - { - char *alg; - - alg = palloc((sep - option) + 1); - memcpy(alg, option, sep - option); - alg[sep - option] = '\0'; - - *algorithm = alg; - *detail = pstrdup(sep + 1); - } -} /* * Check if the filename looks like a WAL file, letting caller know if this |