Skip to content

Preserve recovery state in shared snapshots - #2416

Open
reshke wants to merge 2 commits into
apache:mainfrom
reshke:fix-pr2377-recovery-flag-20261124
Open

reshke wants to merge 2 commits into
apache:mainfrom
reshke:fix-pr2377-recovery-flag-20261124

Conversation

@reshke

@reshke reshke commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Both shared snapshot readers must carry takenDuringRecovery into the restored snapshot. Otherwise an overflowed recovery snapshot follows the normal Subtrans lookup path and can misclassify in-progress XIDs.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


Both shared snapshot readers must carry takenDuringRecovery into the
restored snapshot. Otherwise an overflowed recovery snapshot follows the
normal Subtrans lookup path and can misclassify in-progress XIDs.
@reshke
reshke requested a review from lss602726449 November 24, 2026 09:50
@reshke

reshke commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

I didn't make any isolation/regression here, this case is too narrow

The cursor-reader test calls hash_create() and RestoreSnapshot(), both of which allocate in TopTransactionContext.

Failure: ("MemoryContextIsValid(context)", File: "mcxt.c", Line: 1276)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant