Skip to content

fix(walrestore): use timeline-aware barman-cloud end-of-WAL markers#11133

Open
ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf:pr-fix-end-of-wal
Open

fix(walrestore): use timeline-aware barman-cloud end-of-WAL markers#11133
ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf:pr-fix-end-of-wal

Conversation

@ardentperf

Copy link
Copy Markdown
Contributor

A global end-of-WAL marker can be set by a parent-timeline prefetch miss and then consumed by a child-timeline restore request. In snapshot-restored replica flows, that can cause PostgreSQL to miss valid child-timeline WAL and replay wrong parent-timeline bytes. Reference cloudnative-pg/barman-cloud#276

Update in-tree wal-restore to use the new barman-cloud restorer APIs:

  • ConsumeEndOfWALStreamForWAL
  • SetEndOfWALStreamFromResults

Depends on cloudnative-pg/barman-cloud#277

Update in-tree `wal-restore` to use the new `barman-cloud` restorer
APIs, resolving a bug that can cause replicas to enter a broken state
that CNPG cant recover from. Local marker naming, WAL timeline parsing,
and restore-result filtering policy now lives in
`github.com/cloudnative-pg/barman-cloud/pkg/restorer`. depends on
cloudnative-pg/barman-cloud#277

Signed-off-by: Jeremy Schneider <schneider@ardentperf.com>
@ardentperf ardentperf requested a review from a team as a code owner July 6, 2026 16:15
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 6, 2026
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 release-1.30 labels Jul 6, 2026
@dosubot dosubot Bot added the bug 🐛 Something isn't working label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Linked issue missing.

Reference one in the PR body using a keyword (Closes / Fixes / Resolves / Refs / See) followed by #<issue_id> or owner/repo#<issue_id>.

Alternatively, apply the no-issue label to skip this check.

@jmealo

jmealo commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

👍 LGTM. This looks safe to me and could fix a lot of issues 🤔 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases bug 🐛 Something isn't working release-1.28 release-1.29 release-1.30 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants