Skip to content

Commit e30154b

Browse files
mnencialeonardoce
andauthored
fix: add lz4 compression support for base backups (#868)
Upgrade barman-cloud library to v0.5.1 which includes lz4 support for base backups. Update CRD schema and manifest to expose lz4 as a valid compression option, and clarify docs that lz4 is no longer WAL-only. Closes #867 Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com> Co-authored-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
1 parent 0111ed9 commit e30154b

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ DigitalOcean
1515
Docusaurus
1616
EDB
1717
EKS
18+
EnterpriseDB
1819
Enum
1920
EnvVar
2021
GCP
@@ -76,6 +77,7 @@ backends
7677
barmanObjectName
7778
barmanObjectStore
7879
barmancloud
80+
benchmarked
7981
boto
8082
bzip
8183
cd

config/crd/bases/barmancloud.cnpg.io_objectstores.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ spec:
144144
description: |-
145145
Compress a backup file (a tar file per tablespace) while streaming it
146146
to the object store. Available options are empty string (no
147-
compression, default), `gzip`, `bzip2`, and `snappy`.
147+
compression, default), `gzip`, `bzip2`, `lz4`, and `snappy`.
148148
enum:
149149
- bzip2
150150
- gzip
151+
- lz4
151152
- snappy
152153
type: string
153154
encryption:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.26.2
77
require (
88
github.com/cert-manager/cert-manager v1.20.2
99
github.com/cloudnative-pg/api v1.29.0
10-
github.com/cloudnative-pg/barman-cloud v0.5.0
10+
github.com/cloudnative-pg/barman-cloud v0.5.1
1111
github.com/cloudnative-pg/cloudnative-pg v1.29.0
1212
github.com/cloudnative-pg/cnpg-i v0.5.0
1313
github.com/cloudnative-pg/cnpg-i-machinery v0.4.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
2020
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
2121
github.com/cloudnative-pg/api v1.29.0 h1:mNx6yJ5qi+Xrjs0NYrUy6V4MlXBkVJxGKwvTJZIuTX4=
2222
github.com/cloudnative-pg/api v1.29.0/go.mod h1:bF3HI8UVVcllZ7M8CfBufnb+Us8FyQArhD+4qtX0qhM=
23-
github.com/cloudnative-pg/barman-cloud v0.5.0 h1:DykSaX4o7ee2vyu5FQoG1RJsntHd+EIttIKZbJPlB1Q=
24-
github.com/cloudnative-pg/barman-cloud v0.5.0/go.mod h1:SO2HzLa+GWlSIpGyxnISoJAFPIcaa/qDa33Bb3jefac=
23+
github.com/cloudnative-pg/barman-cloud v0.5.1 h1:vjkXrrxo2DQXHT9u9usqhtaHiPZ/lTfDVs/pIWYTepQ=
24+
github.com/cloudnative-pg/barman-cloud v0.5.1/go.mod h1:XPc5IUFP1y4cZX1sg+Pd8j9V4tmUEVnv3BGCpfQOOg8=
2525
github.com/cloudnative-pg/cloudnative-pg v1.29.0 h1:49Dm8+y4va7RODspJjeaK8uMWP3OGAD0gMsxhjm16Mo=
2626
github.com/cloudnative-pg/cloudnative-pg v1.29.0/go.mod h1:0Sgb/50VyaCnQm3IbWqgnhQG8Kb6mgqo8Jo1J+KtkSI=
2727
github.com/cloudnative-pg/cnpg-i v0.5.0 h1:/TOzpNT6cwNgrpftTtrnLKdoHgMwd+88vZgXjlVgXeE=

manifest.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ spec:
143143
description: |-
144144
Compress a backup file (a tar file per tablespace) while streaming it
145145
to the object store. Available options are empty string (no
146-
compression, default), `gzip`, `bzip2`, and `snappy`.
146+
compression, default), `gzip`, `bzip2`, `lz4`, and `snappy`.
147147
enum:
148148
- bzip2
149149
- gzip
150+
- lz4
150151
- snappy
151152
type: string
152153
encryption:

web/docs/compression.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for space, speed, or a balance of both.
1515

1616
- `bzip2`
1717
- `gzip`
18-
- `lz4` (WAL only)
18+
- `lz4`
1919
- `snappy`
2020
- `xz` (WAL only)
2121
- `zstd` (WAL only)
@@ -41,3 +41,5 @@ network throughput.
4141
| bzip2 | 25,404 | 13,886 | 395 | 67 | 5.9:1 |
4242
| gzip | 116,281 | 3,077 | 395 | 91 | 4.3:1 |
4343
| snappy | 8,134 | 8,341 | 395 | 166 | 2.4:1 |
44+
45+
Numbers come from a 2021 Barman proof of concept ([EnterpriseDB/barman#344](https://github.com/EnterpriseDB/barman/issues/344#issuecomment-992547396)), which predates `lz4` support for base backups. `lz4` is not yet benchmarked.

0 commit comments

Comments
 (0)