Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3f272f2

Browse files
committed
Properly check that pglz is not supported
1 parent 760afb6 commit 3f272f2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/archive.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
6464
elog(INFO, "pg_probackup archive-push from %s to %s", absolute_wal_file_path, backup_wal_file_path);
6565

6666
#ifdef HAVE_LIBZ
67-
if (compress_alg == PGLZ_COMPRESS)
68-
elog(ERROR, "pglz compression is not supported");
6967
if (compress_alg == ZLIB_COMPRESS)
7068
is_compress = IsXLogFileName(wal_file_name);
7169
#endif

src/pg_probackup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,12 @@ main(int argc, char *argv[])
410410
if (compress_level == 0)
411411
compress_alg = NOT_DEFINED_COMPRESS;
412412

413+
#ifndef HAVE_LIBZ
414+
if ((backup_subcmd == BACKUP || backup_subcmd == ARCHIVE_PUSH) &&
415+
compress_alg == PGLZ_COMPRESS)
416+
elog(ERROR, "pglz compression is not supported");
417+
#endif
418+
413419
/* do actual operation */
414420
switch (backup_subcmd)
415421
{

0 commit comments

Comments
 (0)