pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Exit after fatal errors in client-side compression code.
Date: Thu, 05 Mar 2026 19:43:39 +0000
Message-ID: <E1vyEbj-002Ytb-0a@gemulon.postgresql.org> (raw)

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 <tgl@sss.pgh.pa.us>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/1531718.1772644615@sss.pgh.pa.us
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac0accafd6b6eef1a86a50f42346e1e926505df2

Modified Files
--------------
src/bin/pg_dump/compress_lz4.c | 14 ++++++++++++--
src/fe_utils/astreamer_gzip.c  |  2 +-
src/fe_utils/astreamer_lz4.c   | 20 ++++++++++----------
src/fe_utils/astreamer_zstd.c  | 19 ++++++++-----------
4 files changed, 31 insertions(+), 24 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1vyEbj-002Ytb-0a@gemulon.postgresql.org>
Permalink:  ../E1vyEbj-002Ytb-0a@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vyEbj-002Ytb-0a@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Exit after fatal errors in client-side compression code.
  In-Reply-To: <E1vyEbj-002Ytb-0a@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox