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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix failure to honor -Z compression level option in pg_dump -Fd.
Date: 2015-02-18 16:43:09
Message-ID: E1YO7iP-0002k5-DV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_2_STABLE

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

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-02-18 17:23:43 pgsql: Fix placement of "SET row_security" command issuance in pg_dump.
Previous Message Tom Lane 2015-02-17 23:04:19 pgsql: Fix EXPLAIN output for cases where parent table is excluded by c