Barman Cloud CNPG-I backup plugin
Go to file
Leonardo Cecchi 931a06a407
fix: disable management of end-of-wal file flag during backup restoration (#604)
When the end of the WAL stream is reached, the parallel WAL restore
feature attempts to predict the names of subsequent WAL files to restore
and records the first missing WAL file.

On high-availability (HA) replicas, if PostgreSQL requests the first
missing WAL file, the code returns an error status that prompts
PostgreSQL to switch to streaming replication.

Currently, the code assumes a `wal_segment_size` of 16MB for predicting
the next WAL file names. If the configured WAL segment size exceeds
16MB, it may request non-existent WAL files. For instance, with 16MB
segments, the names would range from `000000010000000100000000` to
`0000000100000001000000FF` before moving to the next segment. For 1GB
segments, they would range from `000000010000000100000000` to
`000000010000000100000003`.

With the assumption of a 16MB segment size, the code will not find the
WALs from `000000010000000100000004` to `0000000100000001000000FF`.

While this assumption does not affect HA replicas - which can shift to
streaming mode - it's problematic for a PostgreSQL instance seeking
consistency after a restore, as the restore process will fail.

This patch disables end-of-wal file marker management during
replication, addressing restore issues for backups that were:

1. using a custom WAL file segment size
2. utilizing parallel WAL recovery
3. initiated on one WAL segment and concluded on a different one

Fixes: #603

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
2025-10-17 19:16:54 +02:00
.github/workflows chore(deps): update actions/setup-node action to v6 (#592) 2025-10-15 09:53:28 +02:00
api/v1 feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
cmd/manager feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
config chore(deps): update all cloudnative-pg daggerverse dependencies to 20e467b (#561) 2025-10-05 09:44:48 +02:00
containers chore(deps): update plugin-barman-cloud-base docker tag to v3.16.1-202510150740 (#579) 2025-10-15 14:20:58 +02:00
dagger feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
hack feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
internal fix: disable management of end-of-wal file flag during backup restoration (#604) 2025-10-17 19:16:54 +02:00
kubernetes fix: controller and sidecar containers run as non-root (#225) 2025-03-23 17:00:52 +01:00
logo Initial commit 2024-09-24 14:52:25 +02:00
scripts feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
test/e2e feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
web chore(deps): lock file maintenance (#596) 2025-10-16 11:51:09 +02:00
.dockerignore chore: scaffold (#2) 2024-09-26 11:52:56 +02:00
.gitignore ci: add e2e kustomization.yaml to .gitignore (#112) 2024-12-16 11:04:39 +01:00
.golangci.yml chore(deps): update golangci/golangci-lint docker tag to v2.2.1 (#430) 2025-07-01 17:34:08 +02:00
.release-please-manifest.json chore(main): release 0.7.0 (#506) 2025-09-25 11:28:56 +02:00
.spellcheck.yaml chore: limit the spellchecking to a fixed list of directories (#294) 2025-05-05 10:21:18 +02:00
.wordlist.txt feat: introduce logLevel setting to control verbosity (#536) 2025-09-24 12:32:59 +02:00
CHANGELOG.md chore(main): release 0.7.0 (#506) 2025-09-25 11:28:56 +02:00
CODE_OF_CONDUCT.md Initial commit 2024-09-24 14:52:25 +02:00
CODEOWNERS Initial commit 2024-09-24 14:52:25 +02:00
commitlint.config.js ci: warn on long commit body line (#12) 2024-09-27 10:07:47 +02:00
go.mod fix(deps): update module github.com/cert-manager/cert-manager to v1.19.1 (#600) 2025-10-16 11:49:08 +02:00
go.sum fix(deps): update module github.com/cert-manager/cert-manager to v1.19.1 (#600) 2025-10-16 11:49:08 +02:00
GOVERNANCE.md Initial commit 2024-09-24 14:52:25 +02:00
LICENSE Initial commit 2024-09-24 14:52:25 +02:00
Makefile fix: add cluster/finalizers update permission (#465) 2025-08-14 22:55:25 +02:00
manifest.yaml chore(deps): update all cloudnative-pg daggerverse dependencies to 20e467b (#561) 2025-10-05 09:44:48 +02:00
PROJECT chore: scaffold (#2) 2024-09-26 11:52:56 +02:00
README.md docs: release procedure (#373) 2025-05-29 17:52:44 +02:00
release-please-config.json ci: update version in metadata (#229) 2025-03-25 17:21:56 +01:00
RELEASE-PROCEDURE.md docs: release procedure (#373) 2025-05-29 17:52:44 +02:00
renovate.json5 ci(renovate): fix plugin-barman-cloud-base image updates (#578) 2025-10-08 16:57:56 +02:00
Taskfile.yml chore(deps): update golang docker tag to v1.25.3 (#591) 2025-10-15 09:54:25 +02:00

CloudNativePG

Barman Cloud CNPG-I plugin for CloudNativePG

The documentation for the Barman Cloud Plugin for CloudNativePG is available at https://cloudnative-pg.io/plugin-barman-cloud.


The Barman Cloud CNPG-I plugin is a component of the CloudNativePG project and adheres to the same community-driven governance model under the CNCF.

CNCF logo


CloudNativePG was originally built and sponsored by EDB.

EDB logo


Postgres, PostgreSQL, and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.