1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-03-17 21:18:00 +02:00

Properly check that pglz is not supported

This commit is contained in:
Arthur Zakirov 2018-01-30 16:09:24 +03:00
parent c1f668114e
commit 07366183c4
2 changed files with 8 additions and 1 deletions

View File

@ -63,9 +63,10 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
elog(INFO, "pg_probackup archive-push from %s to %s", absolute_wal_file_path, backup_wal_file_path);
#ifdef HAVE_LIBZ
if (compress_alg == PGLZ_COMPRESS)
elog(ERROR, "pglz compression is not supported");
#ifdef HAVE_LIBZ
if (compress_alg == ZLIB_COMPRESS)
is_compress = IsXLogFileName(wal_file_name);
#endif

View File

@ -410,6 +410,12 @@ main(int argc, char *argv[])
if (compress_level == 0)
compress_alg = NOT_DEFINED_COMPRESS;
#ifndef HAVE_LIBZ
if ((backup_subcmd == BACKUP || backup_subcmd == ARCHIVE_PUSH) &&
compress_alg == ZLIB_COMPRESS)
elog(ERROR, "This build does not support zlib compression");
#endif
/* do actual operation */
switch (backup_subcmd)
{