pgsql: Fix build on zlib-less environments

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix build on zlib-less environments
Date: 2017-08-03 19:08:58
Message-ID: E1ddLUQ-0007Fr-MN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix build on zlib-less environments

Commit 4d57e8381677 added support for getting I/O errors out of zlib,
but it introduced a portability problem for systems without zlib.
Repair by wrapping the zlib call inside #ifdef and restore the original
code in the other branch.

This serves to illustrate the inadequacy of the zlib abstraction in
pg_backup_archiver: there is no way to call gzerror() in that
abstraction. This means that the several places that call GZREAD and
GZWRITE are currently doing error reporting wrongly, but ENOTIME to get
it fixed before next week's release set.

Backpatch to 9.4, like the commit that introduced the problem.

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/12f1e523ad15480e60e8cc20fe5f768b360001d8

Modified Files
--------------
src/bin/pg_dump/pg_backup_tar.c | 6 ++++++
1 file changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-08-03 21:36:58 pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command
Previous Message Robert Haas 2017-08-03 18:28:19 pgsql: Fix lock upgrade hazard in ATExecAttachPartition.