-
Notifications
You must be signed in to change notification settings - Fork 10
PG-1663 Make sure indexes on paritioned tables are encrypted #435
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-1663 Make sure indexes on paritioned tables are encrypted #435
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❌ Your project status has failed because the head coverage (84.67%) 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 @@
## release-17.5.2 #435 +/- ##
===============================================
Coverage 84.66% 84.67%
===============================================
Files 21 21
Lines 2589 2590 +1
Branches 402 401 -1
===============================================
+ Hits 2192 2193 +1
Misses 316 316
Partials 81 81
🚀 New features to boost your workflow:
|
ea19845
to
e14d41c
Compare
CREATE INDEX ON partition_parent (a); | ||
ERROR: Recursive CREATE INDEX on a mix of encrypted and unencrypted relations is not supported | ||
DROP TABLE partition_parent; | ||
-- Index should also be encrypted for new partitionins |
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.
What happens if it ends up with mixed encrypted/non encrypted with the additional partition?
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.
Things will just work since when adding a parition the index's status will be based on the added parition's status, that is not recurisve DDL.
Just realized, please change the target branch to the release branch |
e14d41c
to
97abf7f
Compare
Since we only looked at the parent table and not on the whole tree when setting the status of the encrypted indexes we could easily accidentally create a plain text index on an encrypted table. This patch also makes sure to disallow adding indexes to an inheritance tree where the tables are a mix of encrypted and unecrypted tables.
97abf7f
to
6ed8cc7
Compare
Since we only looked at the parent table and not on the whole tree when setting the status of the encrypted indexes we could easily accidentally create a plain text index on an encrypted table.
This patch also makes sure to disallow adding indexes to an inheritance tree where the tables are a mix of encrypted and unecrypted tables.