]> granicus.if.org Git - postgresql/commit
Fix failure to honor -Z compression level option in pg_dump -Fd.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Feb 2015 16:43:00 +0000 (11:43 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Feb 2015 16:43:00 +0000 (11:43 -0500)
commitb0d53b2e3025a25499d7e81772a04560e749e876
treeca0d3acda93a51d9096167c68bea46dbae12231e
parentcfc14b2bf348528bc8f0f04fe1ff80e7abdf0529
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
src/bin/pg_dump/compress_io.c