-
Notifications
You must be signed in to change notification settings - Fork 394
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
Feat/postgres 16 #4761
Feat/postgres 16 #4761
Conversation
2466 tests run: 2352 passed, 0 failed, 114 skipped (full report)Code coverage (full report)
The comment gets automatically updated with the latest test results
585e4eb at 2023-09-12T12:14:29.919Z :recycle: |
c645bd7
to
c7896e6
Compare
One thing came up in a conversation with @knizhnik today: We have made a couple of small change to some WAL record format. Heap update is one example that I remember, to add the command id, not sure if there are others. Now would be a good chance to revisit that. We still need the command id for WAL generated by neon, but does our pageserver code handle both vanilla Postgres WAL records and the ones created with neon-patched postgres? If the pageserver can handle both, that makes it possible to stream WAL from unmodified Postgres to Neon storage. If we need to make changes the format, add a flag or something, we should do it now for v16. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safekeeper and walproposer changes LGTM
Here is the list of changes in WAL format we have made:
So there are several affected WAL records and several functions where this structures are serialized/deserialized. Just want to remember why it may be needed: there are many complaints from customers concerning slow import of data in Neon. Right now it mostly can be done only using pg_dump/pg_restore, which actually reconstruct heap an indexes from scratch. Using pg_basebackup is certainly more efficient because it allows just copy files.
Right now we are speaking about 3), although 2) can be also very non-trivial task and 1) can be show stopper. It seems to be that least invasive solution will be to add some global variable or may be even GUC, (i.e. |
Let's make it so that you can distinguish the record types from the WAL record itself. An extra flag on the records or something. That way, we don't need any extra bookkeeping of what WAL was generated with unmodified PostgreSQL and which with neon. |
91036ab
to
f714c2e
Compare
Summary of the current status:
|
This also necessarily includes reworking HEAP WAL parsing to depend on PgVersion. It's not great, but manageable.
5574d78
to
5fb8e4c
Compare
And remove now-unused structs
Fixed an incorrect reference to XlNeonHeapUpdate and cleaned up some leftover structs that are no longer used. That was causing regression tests to hang. There are still some failures:
but I didn't investigate that yet |
A case of a bad copy-pasted constant in pg_constants leading to confusion about the type of the record. |
…QL to the 16.0 stamp commit.
18e4f92
to
b6ef3b7
Compare
This PR includes a bunch of test changes that are unrelated to v16. I think they're good refactorings, but let's do them as separate PRs |
I merged |
Fix oversight w.r.t. bail!() in default case
Fix rustfmt errors
This changes slightly the way the neon rmgr is registered: register it in the 'neon_rmgr' library's _PG_init() function. That way, the callers don't need to know about the register_neon_rmgr() function it it.
Fixes earlier copy-paste errors
Refactor tests to have less globals. This will allow to hopefully write more complex tests for our new metric collection requirements in #5297. Includes reverted work from #4761 related to test globals. Co-authored-by: Alexander Bayandin <alexander@neon.tech> Co-authored-by: MMeent <matthias@neon.tech>
Problem
Hopefully none
Summary of changes
This adds postgres-v16 as a vendored postgresql version, and adapts the code to support this version
Checklist before requesting a review
Checklist before merging