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

[compute/postgres] feature: PostgreSQL 17 #8573

Merged
merged 96 commits into from
Sep 12, 2024
Merged

[compute/postgres] feature: PostgreSQL 17 #8573

merged 96 commits into from
Sep 12, 2024

Conversation

MMeent
Copy link
Contributor

@MMeent MMeent commented Jul 31, 2024

Problem

We don't yet support PostgreSQL v17

Summary of changes

PG17 support, based on postgres/postgres@07b828e (RC1 / 2024-09-04)

  • Rebase our changes on top of v17
  • Get v17's patches into separated commits per target area
    • Polish the commits to be actually separate: Several of them need some more work, and PG doens't compile for many of the intermediate commits.
  • Update extension code to compile against v17
  • Update Neon's code to compile against v17
  • Update & validate Pageserver's and Safekeeper's version-specific code for PG17
  • Update & validate pg_ffi/pgxn code
  • [ ] Patch PG17's ReadStream API internals to always prefetch calls, so including for sequential reads To be implemented in a follow-up
  • [ ] Patch Neon's WALReader to pull WAL-pages from buffers (where possible) in PG17. To be implemented as a follow-up
  • [ ] Add all supported extension To be implemented as a follow-up
  • Rebase on top of 17beta3 and/or 17rc1 if/when they release before this PR is merged

NOTICE: The data produced by this version of the PostgreSQL fork WILL NOT BE
COMPATIBLE with the future full release of PostgreSQL 17 due to expected
future changes in magic numbers.
DO NOT EXPECT DATA IN V17-TENANTS TO BE COMPATIBLE WITH THE 17.0 RELEASE!

Part of https://github.com/neondatabase/cloud/issues/12088

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

Copy link

github-actions bot commented Jul 31, 2024

4968 tests run: 4804 passed, 0 failed, 164 skipped (full report)


Flaky tests (3)

Postgres 17

Postgres 16

Code coverage* (full report)

  • functions: 31.8% (7412 of 23294 functions)
  • lines: 49.9% (59562 of 119380 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
630780d at 2024-09-12T17:21:43.588Z :recycle:

@MMeent MMeent force-pushed the feat/pg-17-preps branch from 2ccea7f to 4013caa Compare August 2, 2024 10:48
@lubennikovaav lubennikovaav force-pushed the feat/pg-17-preps branch 2 times, most recently from 8e2807e to 77c2750 Compare August 13, 2024 12:58
@bayandin bayandin added the run-extra-build-macos When placed on a PR, tells the CI to run a build on macOS. No unit tests are run, though. label Aug 22, 2024
MMeent and others added 22 commits August 23, 2024 18:27
TODO:
- Updates & Validation of Pageserver, Safekeeper code with PG17
- Updates & Validation of pg_ffi/pgxn code
- Patch PG17's ReadStream API to prefetch sequential reads
- Rebase on top of Beta3 if/when that releases

NOTICE: The data produced by this version of the PostgreSQL fork WILL NOT BE
COMPATIBLE with the future full release of PostgreSQL 17 due to expected
future changes in magic numbers.
DO NOT EXPECT THIS DATA TO SURVIVE THE 17.0 RELEASE!
TODO figure out why this change was needed, run other tests.
- PG17 is now up-to-date up to 2366ab24, which is >beta3
- PG17 now includes the patches up to v16's 47a9122 ("Preserve combocid v16")
- Various operations in the write path have been vector-ified.
  Future work will go into vectorizing our read- and prefetch paths.
- Rebased the patches on top of neon/HEAD @ b83d722
- Compiling Neon extensions now only requires the postgres headers
  This saves time by not having to compile PostgreSQL again every time
  we want to recompile the extension.

We compile again, but tests TBD.
@MMeent MMeent marked this pull request as ready for review September 11, 2024 16:34
@MMeent MMeent requested review from a team as code owners September 11, 2024 16:34
test_runner/regress/test_twophase.py Outdated Show resolved Hide resolved
@hlinnaka
Copy link
Contributor

hlinnaka commented Sep 11, 2024 via email

Copy link
Collaborator

@jcsp jcsp left a comment

Choose a reason for hiding this comment

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

Some comments, but nothing that can't be picked up in a followup PR.

@MMeent MMeent merged commit 78938d1 into main Sep 12, 2024
81 checks passed
@MMeent MMeent deleted the feat/pg-17-preps branch September 12, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-extra-build-macos When placed on a PR, tells the CI to run a build on macOS. No unit tests are run, though.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants