-
Notifications
You must be signed in to change notification settings - Fork 11
PG-1863 Do not try to delete keys or log WAL for temporary tables #512
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
PG-1863 Do not try to delete keys or log WAL for temporary tables #512
Conversation
a09caff
to
0d6f38c
Compare
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (82.21%) 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 #512 +/- ##
=====================================================
+ Coverage 82.19% 82.21% +0.01%
=====================================================
Files 25 25
Lines 3174 3177 +3
Branches 515 516 +1
=====================================================
+ Hits 2609 2612 +3
Misses 456 456
Partials 109 109
🚀 New features to boost your workflow:
|
0d6f38c
to
a392dbc
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.
Why do we prefer "remove" over "delete" here? We actually delete the keys, not just remove them from our collection of keys while they still exist elsewhere. Right?
@artemgavrilov any comments?
Yep, looks a little bit messy. tde_smgr_log_ As for my preference it should be |
Fixed naming to make it slightly more consistent. I did not fix the issues in |
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.
I'm not sure why we first rename functions from "delete" to "remove" to then name them back.
And with regards to the principal keys XLOG_ constant I think "add" is appropriate since we don't create anything just add "knowledge" of a key that exists elsewhere (in the KMS).
Add does not just add knowledge, it generates a new key too. |
I had planned to fix the renaming back and forth later after the bikeshedding is finished. |
I'm confused. We only create principal keys with the The change for the relation keys from add to create looks fine to me :). |
Yeah, it's dangerous to suggest repainting the shed in the same PR as doing real work 😆 |
13b191a
to
64b432a
Compare
Ah, I missread. Fixed now. |
We forgot to have a check against trying to delete leftover SMGR keys for temporary tables which is a useless operation since they are store in memory. Additionally we forgot to prevent WAL from being written when creating or removing a key in smgrcreate() for temporary tables.
We used a mix of create, add, delete and remove. We still use free and save in pg_tde_tdemap.c but that is soemthing we can fix later.
64b432a
to
276057b
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.
I think the second commit should be done first, or as a separate PR.
I think the "leftover" clarification in the names from the second commit should be done in the currently first commit though, because it's unrelated to renaming the XLOG_ constants.
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.
Looks good!
I'm sorry for the confusion. This is why I shouldn't have pushed cleaning the naming up until after the patch I did for adding the WAL record to remove leftover keys. Sorry about that.
We forgot to have a check against trying to delete leftover SMGR keys for temporary tables which is a useless operation since they are in stored in memory.
Additionally we forgot to prevent WAL from being written when creating or removing a key in
smgrcreate()
for temporary tables.