pgsql: Exit after fatal errors in client-side compression code.
| От | Tom Lane |
|---|---|
| Тема | pgsql: Exit after fatal errors in client-side compression code. |
| Дата | |
| Msg-id | E1vyEbj-002Yth-0l@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cce939c71c11e9434d96c60977bc805682f3d18d 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 | 19 ++++++++----------- src/bin/pg_dump/compress_lz4.c | 13 +++++++++++-- 4 files changed, 30 insertions(+), 24 deletions(-)
В списке pgsql-committers по дате отправления: