Barman Cloud CNPG-I backup plugin
Go to file
Armando Ruocco fb3f0f9dab
fix(walrestore): serve pg_rewind without prefetching and flag machinery (#1007)
When a demoted primary rejoins the cluster after a failover, the
instance manager runs `pg_rewind --restore-target-wal`, and the
resulting `restore_command` invocations are served by this sidecar
exactly as if an instance in recovery were asking. pg_rewind walks the
timeline backwards, fetches every WAL file it needs exactly once, and
treats any restore failure as fatal, so two optimizations meant for
recovery break it: prefetching the following segments is wasted work
that, past the end of the timeline, is guaranteed to end in an archive
miss, and the end-of-wal-stream flag recorded by that miss makes a later
invocation fail without contacting the object store, on a segment the
archive actually has, aborting the whole rewind.

The restore request now carries the context it is made in
(cloudnative-pg/cnpg-i#351). When it says `MODE_REWIND`, the sidecar
restores exactly the requested file: no prefetching, no
end-of-wal-stream flag check, no flag recording. Requests from operators
predating the field keep the current behavior.

This is the plugin-side counterpart of
cloudnative-pg/cloudnative-pg#11204. The cnpg-i dependency points to a
pseudo-version of the protocol pull request and will move to the next
tagged release once it is available.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-07-21 15:01:51 +02:00
.github/workflows chore(deps): update actions/checkout action to v7.0.1 (#1024) 2026-07-20 18:17:40 +02:00
api/v1 fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.0 (#880) 2026-05-06 10:15:29 +02:00
cmd/manager feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
config fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
containers chore(deps): refresh pip-compile outputs (#1020) 2026-07-20 16:12:12 +02:00
dagger chore(deps): update dagger modules to engine v0.21.7 (#1012) 2026-07-17 11:33:01 +02:00
hack fix: inject barman sidecar in replica clusters bootstrapped with pg_basebackup (#965) 2026-06-19 10:18:36 +02:00
internal fix(walrestore): serve pg_rewind without prefetching and flag machinery (#1007) 2026-07-21 15:01:51 +02:00
kubernetes test(e2e): use correct image name in kustomize overlay (#841) 2026-04-11 13:31:31 +02: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 chore(deps): update amazon/aws-cli docker tag to v2.36.3 (#1027) 2026-07-21 09:53:34 +02:00
web chore(deps): lock file maintenance (#1019) 2026-07-20 17:00:18 +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 fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.0 (#880) 2026-05-06 10:15:29 +02:00
.release-please-manifest.json chore(main): release 0.13.0 (#860) 2026-06-10 10:55:17 +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 fix: add lz4 compression support for base backups (#868) 2026-04-21 19:23:45 +02:00
CHANGELOG.md chore(main): release 0.13.0 (#860) 2026-06-10 10:55:17 +02:00
CODE_OF_CONDUCT.md Initial commit 2024-09-24 14:52:25 +02:00
CODEOWNERS chore: expand account names in CODEOWNERS (#1016) 2026-07-21 08:21:32 +10:00
commitlint.config.js ci: warn on long commit body line (#12) 2024-09-27 10:07:47 +02:00
CONTRIBUTING.md docs: add CONTRIBUTING.md file 2026-03-02 17:03:09 +11:00
go.mod fix(deps): update github.com/cloudnative-pg/barman-cloud digest to 950b0f5 (#1022) 2026-07-20 17:47:21 +02:00
go.sum fix(deps): update github.com/cloudnative-pg/barman-cloud digest to 950b0f5 (#1022) 2026-07-20 17:47:21 +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 fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +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 chore(renovate): stop ignoring test/e2e/internal/tests/** (#996) 2026-07-09 11:00:04 +02:00
Taskfile.yml chore(deps): update all cloudnative-pg daggerverse dependencies to f7187c3 (#1028) 2026-07-21 09:22:11 +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.