Skip to content

Refactor SLRU download interface between Postgres and the neon extension #709

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

Conversation

hlinnaka
Copy link
Contributor

Move the responsibility of writing the SLRU segment contents to the neon extension. The neon extension hook now downloads the file and places it to the correct path, and returns a true/false to the caller to indicate if the file existed. On successful download, the caller retries opening the file.

Move the responsibility of writing the SLRU segment contents to the
neon extension. The neon extension hook now downloads the file and
places it to the correct path, and returns a true/false to the caller
to indicate if the file existed. On successful download, the caller
retries opening the file.

While we're at it, refactor the read_slru_segment function so that it
is not part of the SMGR api anymore, but an independent hook. We were
previously pretending it's part of the SMGR api and because of that,
passed a dummy SMgrRelation, but it was a bit silly.
@hlinnaka hlinnaka force-pushed the heikki/ondemand-slru-download-api-change-v16 branch from e871de0 to 782be25 Compare August 6, 2025 18:00
@hlinnaka hlinnaka merged commit 782be25 into REL_16_STABLE_neon Aug 6, 2025
4 of 5 checks passed
@hlinnaka hlinnaka deleted the heikki/ondemand-slru-download-api-change-v16 branch August 6, 2025 21:57
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