Repository navigation
fix(walrestore): use timeline-aware barman-cloud end-of-WAL markers - #993
Merged
Merged
Conversation
Contributor
|
👍 LGTM |
armru
approved these changes
Jul 8, 2026
armru
self-requested a review
July 9, 2026 11:49
mnencia
force-pushed
the
pr-fix-end-of-wal
branch
from
October 15, 2026 10:35
4052756 to
324e93b
Compare
mnencia
force-pushed
the
pr-fix-end-of-wal
branch
2 times, most recently
from
October 15, 2026 15:42
e9318ca to
f15d62f
Compare
armru
approved these changes
Oct 19, 2026
mnencia
force-pushed
the
pr-fix-end-of-wal
branch
2 times, most recently
from
October 20, 2026 13:14
64058da to
b3ff623
Compare
mnencia
added a commit
that referenced
this pull request
Oct 20, 2026
Revert the end-of-wal-stream API migration, which #993 already carries, and suppress the staticcheck deprecation warnings meanwhile. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
mnencia
added a commit
that referenced
this pull request
Oct 20, 2026
The end-of-wal-stream API migration is already carried by #993. Suppress the staticcheck deprecation warnings meanwhile. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Update `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 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>
Use ClearEndOfWALStream from barman-cloud for pg_rewind restores. It also clears the timeline-scoped markers and avoids the deprecated legacy calls. Move the fork pin to the commit that adds it. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
The segments of this test are on timeline 1. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
At the first segment of a new timeline PostgreSQL requests the child-timeline file and, if that fails, falls back to the parent-timeline one, which holds WAL past the switch point. Request a child-timeline segment while the parent-timeline end-of-wal-stream flag is set, and check that it is restored and the flag is left alone. This covers the plugin side of cloudnative-pg/barman-cloud#276: a timeline-blind flag check fails the request. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
The clearEndOfWALStreamFlag tests went away with the helper, so nothing checked that a pg_rewind restore discards the timeline-scoped flags too, nor that it does so before serving a WAL file from the spool. Cover both through restoreFromBarmanObjectStore, using a spool hit so no download runs. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
mnencia
force-pushed
the
pr-fix-end-of-wal
branch
from
October 20, 2026 16:58
b3ff623 to
3aaf7aa
Compare
mnencia
approved these changes
Oct 20, 2026
Pin the call site of ConsumeEndOfWALStreamForWAL: the flag is scoped to the timeline of the requested WAL and consumed once. Also tighten the related comments. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
leonardoce
approved these changes
Oct 21, 2026
armru
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
wal-restoreto use the timeline-awarebarman-cloudrestorer APIs (ConsumeEndOfWALStreamForWAL,SetEndOfWALStreamFromResults). In pg_rewind mode,ClearEndOfWALStreamnow discards the markers of every timeline. This also drops thenolintmarkers for the deprecated calls.