Skip to content
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

moving LastWrittenLSNCache to Neon Extension #11031

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thesuhas
Copy link
Contributor

@thesuhas thesuhas commented Feb 27, 2025

Problem

We currently have this code duplicated across different PG versions. Moving this to an extension would reduce duplication and simplify maintenance.

Summary of changes

Moving the LastWrittenLSN code from PG versions to the Neon extension and linking it with hooks

Closes: #10973

@thesuhas thesuhas requested review from a team as code owners February 27, 2025 22:14
Copy link

If this PR added a GUC in the Postgres fork or neon extension,
please regenerate the Postgres settings in the cloud repo:

make NEON_WORKDIR=path/to/neon/checkout \
  -C goapp/internal/shareddomain/postgres generate

If you're an external contributor, a Neon employee will assist in
making sure this step is done.

Copy link

7744 tests run: 7357 passed, 9 failed, 378 skipped (full report)


Failures on Postgres 17

Failures on Postgres 16

Failures on Postgres 15

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_postgres_version[release-pg15] or test_postgres_version[release-pg15] or test_postgres_version[release-pg16] or test_postgres_version[release-pg16] or test_postgres_version[release-pg17] or test_postgres_version[release-pg17] or test_postgres_version[debug-pg17] or test_postgres_version[release-pg17] or test_postgres_version[release-pg17]"
Flaky tests (1)

Postgres 15

Test coverage report is not available

The comment gets automatically updated with the latest test results
e4f8d9c at 2025-02-27T23:47:47.906Z :recycle:

static void
lwlc_register_gucs(void)
{
DefineCustomIntVariable("neon.lwlsn_cache_size",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's expand lwlsn to last written lsn

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.

Improvement: Move the last written LSN (LwLSN) cache into neon extension
2 participants