feat: support lz4, xz, and zstandard compressions (#201)

Closes #200

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Marco Nenciarini 2025-03-19 10:58:55 +01:00 committed by GitHub
parent 47e626e381
commit 795313f4aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 11 deletions

View File

@ -137,11 +137,14 @@ spec:
description: |- description: |-
Compress a backup file (a tar file per tablespace) while streaming it Compress a backup file (a tar file per tablespace) while streaming it
to the object store. Available options are empty string (no to the object store. Available options are empty string (no
compression, default), `gzip`, `bzip2` or `snappy`. compression, default), `gzip`, `bzip2`, `lz4`, `snappy`, `xz`, and `zstd`.
enum: enum:
- gzip
- bzip2 - bzip2
- gzip
- lz4
- snappy - snappy
- xz
- zstd
type: string type: string
encryption: encryption:
description: |- description: |-
@ -328,11 +331,15 @@ spec:
compression: compression:
description: |- description: |-
Compress a WAL file before sending it to the object store. Available Compress a WAL file before sending it to the object store. Available
options are empty string (no compression, default), `gzip`, `bzip2` or `snappy`. options are empty string (no compression, default), `gzip`, `bzip2`,
`lz4`, `snappy`, `xz`, and `zstd`.
enum: enum:
- gzip
- bzip2 - bzip2
- gzip
- lz4
- snappy - snappy
- xz
- zstd
type: string type: string
encryption: encryption:
description: |- description: |-

2
go.mod
View File

@ -7,7 +7,7 @@ toolchain go1.24.1
require ( require (
github.com/cert-manager/cert-manager v1.17.1 github.com/cert-manager/cert-manager v1.17.1
github.com/cloudnative-pg/api v1.25.1 github.com/cloudnative-pg/api v1.25.1
github.com/cloudnative-pg/barman-cloud v0.2.0 github.com/cloudnative-pg/barman-cloud v0.3.0
github.com/cloudnative-pg/cloudnative-pg v1.25.1 github.com/cloudnative-pg/cloudnative-pg v1.25.1
github.com/cloudnative-pg/cnpg-i v0.1.0 github.com/cloudnative-pg/cnpg-i v0.1.0
github.com/cloudnative-pg/cnpg-i-machinery v0.2.0 github.com/cloudnative-pg/cnpg-i-machinery v0.2.0

4
go.sum
View File

@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cloudnative-pg/api v1.25.1 h1:uNjKiB0MIspUeH9l651SnFDcuflr1crB3t6LjxUCafQ= github.com/cloudnative-pg/api v1.25.1 h1:uNjKiB0MIspUeH9l651SnFDcuflr1crB3t6LjxUCafQ=
github.com/cloudnative-pg/api v1.25.1/go.mod h1:fwF5g4XkuNZqYXIeRR3AJvUfWlqWig+r2DXc5bEmw6U= github.com/cloudnative-pg/api v1.25.1/go.mod h1:fwF5g4XkuNZqYXIeRR3AJvUfWlqWig+r2DXc5bEmw6U=
github.com/cloudnative-pg/barman-cloud v0.2.0 h1:KMwJPKjytDqljNNOounBGojsGTXiowztH0WQrVB8/DQ= github.com/cloudnative-pg/barman-cloud v0.3.0 h1:tCtIF7nsHDH5X7nAXXd7VqNKKNGHrycXAyyKKKpdGS4=
github.com/cloudnative-pg/barman-cloud v0.2.0/go.mod h1:kNIUU+fpnYjkr25YwHnteROLhbs6rqpjDiB8XW1+sug= github.com/cloudnative-pg/barman-cloud v0.3.0/go.mod h1:8m6W117343zT28ctcskUYEu/dy+MX3hUUW4DynH8MLI=
github.com/cloudnative-pg/cloudnative-pg v1.25.1 h1:Yc6T7ikQ1AiWXBQht+6C3DoihrIpUN2OkM1dIwqadTo= github.com/cloudnative-pg/cloudnative-pg v1.25.1 h1:Yc6T7ikQ1AiWXBQht+6C3DoihrIpUN2OkM1dIwqadTo=
github.com/cloudnative-pg/cloudnative-pg v1.25.1/go.mod h1:96b9bRFLSr3uFWHjhytPdcvKIKwy9H6AG7cH0O6jefs= github.com/cloudnative-pg/cloudnative-pg v1.25.1/go.mod h1:96b9bRFLSr3uFWHjhytPdcvKIKwy9H6AG7cH0O6jefs=
github.com/cloudnative-pg/cnpg-i v0.1.0 h1:QH2xTsrODMhEEc6B25GbOYe7ZIttDmSkYvXotfU5dfs= github.com/cloudnative-pg/cnpg-i v0.1.0 h1:QH2xTsrODMhEEc6B25GbOYe7ZIttDmSkYvXotfU5dfs=

View File

@ -136,11 +136,14 @@ spec:
description: |- description: |-
Compress a backup file (a tar file per tablespace) while streaming it Compress a backup file (a tar file per tablespace) while streaming it
to the object store. Available options are empty string (no to the object store. Available options are empty string (no
compression, default), `gzip`, `bzip2` or `snappy`. compression, default), `gzip`, `bzip2`, `lz4`, `snappy`, `xz`, and `zstd`.
enum: enum:
- gzip
- bzip2 - bzip2
- gzip
- lz4
- snappy - snappy
- xz
- zstd
type: string type: string
encryption: encryption:
description: |- description: |-
@ -327,11 +330,15 @@ spec:
compression: compression:
description: |- description: |-
Compress a WAL file before sending it to the object store. Available Compress a WAL file before sending it to the object store. Available
options are empty string (no compression, default), `gzip`, `bzip2` or `snappy`. options are empty string (no compression, default), `gzip`, `bzip2`,
`lz4`, `snappy`, `xz`, and `zstd`.
enum: enum:
- gzip
- bzip2 - bzip2
- gzip
- lz4
- snappy - snappy
- xz
- zstd
type: string type: string
encryption: encryption:
description: |- description: |-