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