Exit after fatal errors in client-side compression code.

It looks like whoever wrote the astreamer (nee bbstreamer) code
thought that pg_log_error() is equivalent to elog(ERROR), but
it's not; it just prints a message.  So all these places tried to
continue on after a compression or decompression error return,
with the inevitable result being garbage output and possibly
cascading error messages.  We should use pg_fatal() instead.

These error conditions are probably pretty unlikely in practice,
which no doubt accounts for the lack of field complaints.

Author: Tom Lane <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9a42888a32fd2ebc3d8e39bbc450556c326c9db7

Modified Files
--------------
src/bin/pg_basebackup/bbstreamer_gzip.c |  2 +-
src/bin/pg_basebackup/bbstreamer_lz4.c  | 20 ++++++++++----------
src/bin/pg_basebackup/bbstreamer_zstd.c | 12 ++++++------
3 files changed, 17 insertions(+), 17 deletions(-)

Reply via email to