Make pg_dump behave more sanely when built without HAVE_LIBZ.
authorTom Lane
Thu, 26 May 2016 15:51:04 +0000 (11:51 -0400)
committerTom Lane
Thu, 26 May 2016 15:51:16 +0000 (11:51 -0400)
commitf2f18a37c335384240c4f6b5ebbed4678ae8949c
tree43830389937708b3dcc05ca9b10be1731c86ec73
parentd32bc204c733276810a400db41f64f32c489733f
Make pg_dump behave more sanely when built without HAVE_LIBZ.

For some reason the code to emit a warning and switch to uncompressed
output was placed down in the guts of pg_backup_archiver.c.  This is
definitely too late in the case of parallel operation (and I rather
wonder if it wasn't too late for other purposes as well).  Put it in
pg_dump.c's option-processing logic, which seems a much saner place.

Also, the default behavior with custom or directory output format was
to emit the warning telling you the output would be uncompressed.  This
seems unhelpful, so silence that case.

Back-patch to 9.3 where parallel dump was introduced.

Kyotaro Horiguchi, adjusted a bit by me

Report: <20160526.185551.242041780[email protected]>
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c