Skip to content

Reintialize page in allocNewBuffer only when buffer is returned #664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

knizhnik
Copy link

No description provided.

github-merge-queue bot pushed a commit to neondatabase/neon that referenced this pull request Jul 22, 2025
## Problem

See #12387

`allocNewBuffer` initialise page with zeros 
but not always return it because of parity checks.
In case of wrong parity the page is rejected and as a result we have
dirty page with zero LSN, which cause assertion failure on neon_write
when page is evicted from shared buffers.

## Summary of changes

Perform, page initialisation in `allocNewBuffer` only when buffer is
returned (parity check is passed).

Postgres PRs:
neondatabase/postgres#661
neondatabase/postgres#662
neondatabase/postgres#663
neondatabase/postgres#664

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
Co-authored-by: Kosntantin Knizhnik <[email protected]>
@knizhnik knizhnik merged commit fa17884 into REL_17_STABLE_neon Jul 22, 2025
1 check passed
@knizhnik knizhnik deleted the spgist_alloc_newbuf_fix_v17 branch July 22, 2025 17:54
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.

2 participants