Re: BUG #12779: pg_dump -Fd doesn't care about -Z - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12779: pg_dump -Fd doesn't care about -Z
Date
Msg-id 21598.1424199121@sss.pgh.pa.us
Whole thread Raw
In response to BUG #12779: pg_dump -Fd doesn't care about -Z  (christoph.berg@credativ.de)
Responses Re: BUG #12779: pg_dump -Fd doesn't care about -Z  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
christoph.berg@credativ.de writes:
> pg_dump -Fd doesn't seem to care about -Z for Z > 0:

Yeah, you're right: whoever wrote pg_dump/compress_io.c seems to have
been utterly clueless about the idea that zlib needs to be told which
compression level to use.  That logic is just treating the compression
level as a binary compress-or-not flag.  cfopen_write() is obviously
losing the compression level info, and even if it weren't, cfopen()
thinks that argument is binary not a number to pass down.  There may be
other subroutines in there and/or in pg_backup_directory.c that missed
the memo as well.

This doesn't look tremendously hard to fix, but it's not a one-liner
either.  Don't have time for it personally right now.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fwd: BUG #12772: Unexpected autovacuum behavior
Next
From: Michael Paquier
Date:
Subject: Re: BUG #12779: pg_dump -Fd doesn't care about -Z