aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/basebackup_zstd.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-03-15 13:06:25 -0400
committerRobert Haas <rhaas@postgresql.org>2022-03-15 13:06:25 -0400
commit75eae090876f4d47bf6a1e1016627b75da612307 (patch)
tree55bd88228194696d5c1c6e25b2332a17148c978c /src/backend/replication/basebackup_zstd.c
parent695f459f1713303ba33b76eeb866c6501dff6380 (diff)
downloadpostgresql-75eae090876f4d47bf6a1e1016627b75da612307.tar.gz
postgresql-75eae090876f4d47bf6a1e1016627b75da612307.zip
Change HAVE_LIBLZ4 and HAVE_LIBZSTD tests to USE_LZ4 and USE_ZSTD.
These tests were added recently, but older code tests USE_LZ4 rathr than HAVE_LIBLZ4, so let's follow the established precedent. It also seems more consistent with the intent of the configure tests, since I think that the USE_* symbols are intended to correspond to what the user requested, and the HAVE_* symbols to what configure found while probing. Discussion: http://postgr.es/m/CA+Tgmoap+hTD2-QNPJLH4tffeFE8MX5+xkbFKMU3FKBy=ZSNKA@mail.gmail.com
Diffstat (limited to 'src/backend/replication/basebackup_zstd.c')
-rw-r--r--src/backend/replication/basebackup_zstd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/replication/basebackup_zstd.c b/src/backend/replication/basebackup_zstd.c
index e3f9b1d4dc0..c0e2be6e27b 100644
--- a/src/backend/replication/basebackup_zstd.c
+++ b/src/backend/replication/basebackup_zstd.c
@@ -12,13 +12,13 @@
*/
#include "postgres.h"
-#ifdef HAVE_LIBZSTD
+#ifdef USE_ZSTD
#include <zstd.h>
#endif
#include "replication/basebackup_sink.h"
-#ifdef HAVE_LIBZSTD
+#ifdef USE_ZSTD
typedef struct bbsink_zstd
{
@@ -61,7 +61,7 @@ const bbsink_ops bbsink_zstd_ops = {
bbsink *
bbsink_zstd_new(bbsink *next, int compresslevel)
{
-#ifndef HAVE_LIBZSTD
+#ifndef USE_ZSTD
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("zstd compression is not supported by this build")));
@@ -86,7 +86,7 @@ bbsink_zstd_new(bbsink *next, int compresslevel)
#endif
}
-#ifdef HAVE_LIBZSTD
+#ifdef USE_ZSTD
/*
* Begin backup.