diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-08-02 18:26:26 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-08-02 18:26:57 -0400 |
commit | 330e68734b822416b5ef94da64f9b6b92f46c083 (patch) | |
tree | cad9d753f71a6d5b9972b06255e05f31eaf55f61 /src/backend/utils/adt/ascii.c | |
parent | c006309e1ee247d1445c3c24dd616f5fa15d4516 (diff) | |
download | postgresql-330e68734b822416b5ef94da64f9b6b92f46c083.tar.gz postgresql-330e68734b822416b5ef94da64f9b6b92f46c083.zip |
Fix pg_dump's errno checking for zlib I/O
Some error reports were reporting strerror(errno), which for some error
conditions coming from zlib are wrong, resulting in confusing reports
such as
pg_restore: [compress_io] could not read from input file: Success
which makes no sense. To correctly extract the error message we need to
use gzerror(), so let's do that.
This isn't as comprehensive or as neat as I would like, but at least it
should improve things in many common cases. The zlib abstraction in
compress_io does not seem to be applied consistently enough; we could
perhaps improve that, but it seems master-only material, not a bug fix
for back-patching.
This problem goes back all the way, but I decided to apply back to 9.4
only, because older branches don't contain commit 14ea89366 which this
change depends on.
Authors: Vladimir Kunschikov, Álvaro Herrera
Discussion: https://postgr.es/m/1498120508308.9826@infotecs.ru
Diffstat (limited to 'src/backend/utils/adt/ascii.c')
0 files changed, 0 insertions, 0 deletions