postgresql/src/bin/pg_basebackup
Robert Haas 61762426e6 Fix a few goofs in new backup compression code.
When we try to set the zstd compression level either on the client
or on the server, check for errors.

For any algorithm, on the client side, don't try to set the compression
level unless the user specified one. This was visibly broken for
zstd, which managed to set -1 rather than 0 in this case, but tidy
up the code for the other methods, too.

On the client side, if we fail to create a ZSTD_CCtx, exit after
reporting the error. Otherwise we'll dereference a null pointer.

Patch by me, reviewed by Dipesh Pandit.

Discussion: http://postgr.es/m/CA+TgmoZK3zLQUCGi1h4XZw4jHiAWtcACc+GsdJR1_Mc19jUjXA@mail.gmail.com
2022-03-28 12:19:05 -04:00
..
po Translation updates 2021-06-21 12:33:50 +02:00
t Harden TAP tests that intentionally corrupt page checksums. 2022-03-25 14:23:26 -04:00
.gitignore Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00
Makefile Add support for zstd base backup compression. 2022-03-08 09:52:43 -05:00
bbstreamer.h Replace BASE_BACKUP COMPRESSION_LEVEL option with COMPRESSION_DETAIL. 2022-03-23 09:19:14 -04:00
bbstreamer_file.c Allow server-side compression to be used with -Fp. 2022-01-28 08:41:25 -05:00
bbstreamer_gzip.c Fix a few goofs in new backup compression code. 2022-03-28 12:19:05 -04:00
bbstreamer_inject.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
bbstreamer_lz4.c Fix a few goofs in new backup compression code. 2022-03-28 12:19:05 -04:00
bbstreamer_tar.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
bbstreamer_zstd.c Fix a few goofs in new backup compression code. 2022-03-28 12:19:05 -04:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00
pg_basebackup.c pg_basebackup: Try to fix some failures on Windows. 2022-03-23 13:25:26 -04:00
pg_receivewal.c Fix header inclusion order in pg_receivewal.c 2022-03-18 10:38:16 +09:00
pg_recvlogical.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
receivelog.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
receivelog.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
streamutil.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
streamutil.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
walmethods.c Change HAVE_LIBLZ4 and HAVE_LIBZSTD tests to USE_LZ4 and USE_ZSTD. 2022-03-15 13:06:25 -04:00
walmethods.h Add support for zstd base backup compression. 2022-03-08 09:52:43 -05:00