Skip to content

fix(walrestore): apply timeline validation before plugin WAL restore#9849

Merged
leonardoce merged 2 commits intomainfrom
dev/fix-timeline-protection-with-plugins
Feb 4, 2026
Merged

fix(walrestore): apply timeline validation before plugin WAL restore#9849
leonardoce merged 2 commits intomainfrom
dev/fix-timeline-protection-with-plugins

Conversation

@mnencia
Copy link
Member

@mnencia mnencia commented Feb 3, 2026

Move timeline history file validation to execute before any WAL restore attempt (plugin or in-tree) rather than only for in-tree restores. This prevents replicas from downloading timeline history files with timeline IDs higher than the cluster's current timeline when plugins handle WAL restore.

The timeline protection added in #9650 was only applied to in-tree WAL restore, but not to plugin-based restore. This allowed the protection to be completely bypassed when using plugins, causing replicas to download future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.27 release-1.28 labels Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

❗ 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

@mnencia mnencia force-pushed the dev/fix-timeline-protection-with-plugins branch from 7a62957 to 55d810b Compare February 3, 2026 18:12
@mnencia
Copy link
Member Author

mnencia commented Feb 3, 2026

/test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/21642127989

@mnencia mnencia marked this pull request as ready for review February 3, 2026 18:45
@mnencia mnencia requested a review from a team as a code owner February 3, 2026 18:45
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug 🐛 Something isn't working ok to merge 👌 This PR can be merged labels Feb 3, 2026
@mnencia
Copy link
Member Author

mnencia commented Feb 3, 2026

@dosu never add the ok-to-merge. It is reserved for the CI automation, and you must never add it.

@mnencia mnencia removed the ok to merge 👌 This PR can be merged label Feb 3, 2026
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Feb 3, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 4, 2026
Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@leonardoce leonardoce force-pushed the dev/fix-timeline-protection-with-plugins branch from 55d810b to 9ba4f3c Compare February 4, 2026 09:19
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
@leonardoce leonardoce requested a review from jsilvela as a code owner February 4, 2026 09:22
@leonardoce leonardoce merged commit 1044c8e into main Feb 4, 2026
34 checks passed
@leonardoce leonardoce deleted the dev/fix-timeline-protection-with-plugins branch February 4, 2026 09:31
leonardoce added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
(cherry picked from commit d0e801ee5392465d8629056c79e58c32b215dcff)
leonardoce added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
(cherry picked from commit d0e801ee5392465d8629056c79e58c32b215dcff)
(cherry picked from commit 9e2e469)
mnencia added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
mnencia added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
mnencia added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
(cherry picked from commit d0e801ee5392465d8629056c79e58c32b215dcff)
mnencia added a commit that referenced this pull request Feb 4, 2026
…9849)

Move timeline history file validation to execute before any WAL restore
attempt (plugin or in-tree) rather than only for in-tree restores. This
prevents replicas from downloading timeline history files with timeline
IDs higher than the cluster's current timeline when plugins handle WAL
restore.

The timeline protection added in #9650 was only applied to in-tree WAL
restore, but not to plugin-based restore. This allowed the protection to
be completely bypassed when using plugins, causing replicas to download
future timeline history files and fail with timeline mismatch errors.

Fixes the timeline protection introduced in ef73994.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
(cherry picked from commit 1044c8e)
(cherry picked from commit d0e801ee5392465d8629056c79e58c32b215dcff)
(cherry picked from commit 9e2e469)
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 lgtm This PR has been approved by a maintainer no-issue ok to merge 👌 This PR can be merged release-1.25 release-1.27 release-1.28 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants