PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | pg_compress_specification |
Macros | |
#define | PG_COMPRESSION_OPTION_WORKERS (1 << 0) |
#define | PG_COMPRESSION_OPTION_LONG_DISTANCE (1 << 1) |
Typedefs | |
typedef enum pg_compress_algorithm | pg_compress_algorithm |
typedef struct pg_compress_specification | pg_compress_specification |
Enumerations | |
enum | pg_compress_algorithm { PG_COMPRESSION_NONE , PG_COMPRESSION_GZIP , PG_COMPRESSION_LZ4 , PG_COMPRESSION_ZSTD } |
Functions | |
void | parse_compress_options (const char *option, char **algorithm, char **detail) |
bool | parse_compress_algorithm (char *name, pg_compress_algorithm *algorithm) |
const char * | get_compress_algorithm_name (pg_compress_algorithm algorithm) |
void | parse_compress_specification (pg_compress_algorithm algorithm, char *specification, pg_compress_specification *result) |
char * | validate_compress_specification (pg_compress_specification *) |
#define PG_COMPRESSION_OPTION_LONG_DISTANCE (1 << 1) |
Definition at line 30 of file compression.h.
#define PG_COMPRESSION_OPTION_WORKERS (1 << 0) |
Definition at line 29 of file compression.h.
typedef enum pg_compress_algorithm pg_compress_algorithm |
typedef struct pg_compress_specification pg_compress_specification |
Enumerator | |
---|---|
PG_COMPRESSION_NONE | |
PG_COMPRESSION_GZIP | |
PG_COMPRESSION_LZ4 | |
PG_COMPRESSION_ZSTD |
Definition at line 21 of file compression.h.
const char* get_compress_algorithm_name | ( | pg_compress_algorithm | algorithm | ) |
Definition at line 69 of file compression.c.
References Assert, PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, and PG_COMPRESSION_ZSTD.
Referenced by PrintTOCSummary(), supports_compression(), and validate_compress_specification().
bool parse_compress_algorithm | ( | char * | name, |
pg_compress_algorithm * | algorithm | ||
) |
Definition at line 49 of file compression.c.
References name, PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, and PG_COMPRESSION_ZSTD.
Referenced by main(), and parse_basebackup_options().
void parse_compress_options | ( | const char * | option, |
char ** | algorithm, | ||
char ** | detail | ||
) |
Referenced by backup_parse_compress_options(), and main().
void parse_compress_specification | ( | pg_compress_algorithm | algorithm, |
char * | specification, | ||
pg_compress_specification * | result | ||
) |
Definition at line 107 of file compression.c.
References _, pg_compress_specification::algorithm, expect_boolean_value(), expect_integer_value(), pg_compress_specification::level, pg_compress_specification::long_distance, pg_compress_specification::options, palloc(), pg_compress_specification::parse_error, pfree(), PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_OPTION_LONG_DISTANCE, PG_COMPRESSION_OPTION_WORKERS, PG_COMPRESSION_ZSTD, psprintf(), pstrdup(), value, and pg_compress_specification::workers.
Referenced by main(), and parse_basebackup_options().
char* validate_compress_specification | ( | pg_compress_specification * | spec | ) |
Definition at line 344 of file compression.c.
References _, pg_compress_specification::algorithm, get_compress_algorithm_name(), pg_compress_specification::level, pg_compress_specification::options, pg_compress_specification::parse_error, PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_OPTION_LONG_DISTANCE, PG_COMPRESSION_OPTION_WORKERS, PG_COMPRESSION_ZSTD, and psprintf().
Referenced by main(), and parse_basebackup_options().