Skip to content
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-952: Handle non existent principal key in tde_heap #287

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Sep 18, 2024

Previously when the database had no principal key, tde_heap simply igored it and created a table without encryption.

With this change, it reports an error instead.

if (principal_key == NULL)
{
ereport(ERROR,
(errmsg("failed to retrieve principal key")));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks good. However, the error message should be more descriptive and suggestive. Maybe an error hint should be added as well to let users know how they can solve this issue, like suggesting they create a principal key.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, I just copied the error message we display for tde_heap_basic

Previously when the database had no principal key, tde_heap simply
igored it and created a table without encryption.

With this change, it reports an error instead.
@dutow dutow merged commit d715cb1 into percona:main Sep 30, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants