Make pg_dump behave more sanely when built without HAVE_LIBZ.
authorTom Lane <[email protected]>
Thu, 26 May 2016 15:51:04 +0000 (11:51 -0400)
committerTom Lane <[email protected]>
Thu, 26 May 2016 15:51:20 +0000 (11:51 -0400)
commit99565a1ef88447bd8844321159f3d848721f04c4
treee6f7e49853c9abc80411369a20ac2b77573f7b6f
parentb9784e1f769497dcfaa1f866913f3d86a2adf176
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