summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/walmethods.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_basebackup/walmethods.h')
-rw-r--r--src/bin/pg_basebackup/walmethods.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h
index ec54019cfc3..76530dc9419 100644
--- a/src/bin/pg_basebackup/walmethods.h
+++ b/src/bin/pg_basebackup/walmethods.h
@@ -9,6 +9,7 @@
*-------------------------------------------------------------------------
*/
+#include "common/compression.h"
typedef void *Walfile;
@@ -19,15 +20,6 @@ typedef enum
CLOSE_NO_RENAME
} WalCloseMethod;
-/* Types of compression supported */
-typedef enum
-{
- COMPRESSION_GZIP,
- COMPRESSION_LZ4,
- COMPRESSION_ZSTD,
- COMPRESSION_NONE
-} WalCompressionMethod;
-
/*
* A WalWriteMethod structure represents the different methods used
* to write the streaming WAL as it's received.
@@ -68,7 +60,7 @@ struct WalWriteMethod
char *(*get_file_name) (const char *pathname, const char *temp_suffix);
/* Returns the compression method */
- WalCompressionMethod (*compression_method) (void);
+ pg_compress_algorithm (*compression_algorithm) (void);
/*
* Write count number of bytes to the file, and return the number of bytes
@@ -104,10 +96,10 @@ struct WalWriteMethod
* not all those required for pg_receivewal)
*/
WalWriteMethod *CreateWalDirectoryMethod(const char *basedir,
- WalCompressionMethod compression_method,
+ pg_compress_algorithm compression_algo,
int compression, bool sync);
WalWriteMethod *CreateWalTarMethod(const char *tarbase,
- WalCompressionMethod compression_method,
+ pg_compress_algorithm compression_algo,
int compression, bool sync);
/* Cleanup routines for previously-created methods */