-
Notifications
You must be signed in to change notification settings - Fork 11
Separate file format for relation and wal keys #500
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
Separate file format for relation and wal keys #500
Conversation
This is the only field from the InternalKey structure that's actually used, and other "raw" crypto functions doesn't use these structures.
This function probably belongs elsewhere than in the key file code, but that's where it currently resides so expose it so it can also be used elsewhere.
384e0db
to
a1ff94c
Compare
|
a1ff94c
to
29b44d4
Compare
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (82.03%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## TDE_REL_17_STABLE #500 +/- ##
=====================================================
+ Coverage 81.77% 82.03% +0.26%
=====================================================
Files 24 25 +1
Lines 2991 3168 +177
Branches 485 514 +29
=====================================================
+ Hits 2446 2599 +153
- Misses 444 460 +16
- Partials 101 109 +8
🚀 New features to boost your workflow:
|
7f2d183
to
7f969ef
Compare
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.
It screams for abstractions but I reckon that's the best we can do right now. Thanks!
We want to add timeline information to the wal keys and cannot easily do so without affecting existing clusters' relation key files. This commit does the bare minimum to separate the two completely and as such contains a fair bit of duplicated code. The file format for the WAL key file is exactly the same before and after this commit. There is _a lot_ of cleanup that will have to be done on both sides of this separation, but this is a bit of "it gets worse before it gets better".
This is to prevent this file from ever getting mixed up with a relation key file as these might no longer be of the same format.
Instead of 1664_keys it's now called wal_encryption_keys. This lets us use a constant name for it instead of generating it from an Oid pretending it's a relation key file. Also remove some now unused Oid parameters to functions.
7f969ef
to
75b5032
Compare
There is a lot of cleanup that will have to be done on both sides of this separation, but this is a bit of "it gets worse before it gets better".
There is also plenty of code, especially around the principal keys, that will need to be re-unified after having properly abstracted them from these key files.
Changes to either format should at least not affect the other after this.
https://perconadev.atlassian.net/browse/PG-1813