-
Notifications
You must be signed in to change notification settings - Fork 11
PG-1411 Make pg_resetwal work with TDE #476
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
Conversation
f29751d
to
763b096
Compare
763b096
to
575fe0e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (81.78%) 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 #476 +/- ##
=====================================================
+ Coverage 81.75% 81.78% +0.03%
=====================================================
Files 24 24
Lines 2987 2987
Branches 485 485
=====================================================
+ Hits 2442 2443 +1
+ Misses 444 443 -1
Partials 101 101
🚀 New features to boost your workflow:
|
2e51b72
to
7b5e387
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.
a bit more comment nitpicking)
As pg_resetwal removes old WAL segments and creates new one with empty record we can do that write in unencrypted mode. However that requires new WAL key creation in case if encryption was enabled before.
These tests are copy of original pg_resetwal tests with enalbed WAL encryption and removed flags validation as we interested here only in proper enrypted WAL handling.
7b5e387
to
d70f2c9
Compare
https://perconadev.atlassian.net/browse/PG-1411
The only thing that differs in pg_resetwal for TDE setups is that it performs WAL key rotation the same way as server itself on startup. During this rotation pg_resetwal always create
unecrypted
type of key as WAL will contain only one record that don't contain anything sensitive. So no need actually encrypt anything yet. On startup server will create new key with proper type.