pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd.
Date
Msg-id E1YO7iP-0002k2-DK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix failure to honor -Z compression level option in pg_dump -Fd.

cfopen() and cfopen_write() failed to pass the compression level through
to zlib, so that you always got the default compression level if you got
any at all.

In passing, also fix these and related functions so that the correct errno
is reliably returned on failure; the original coding supposes that free()
cannot change errno, which is untrue on at least some platforms.

Per bug #12779 from Christoph Berg.  Back-patch to 9.1 where the faulty
code was introduced.

Michael Paquier

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/a7ad5cf0cfcfab8418000d652fa4f0c6ad6c8911

Modified Files
--------------
src/bin/pg_dump/compress_io.c |   38 +++++++++++++++++++++++++++++---------
1 file changed, 29 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd.