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

Updating the toasted column in encrypted table causes the crash (#82) #103

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

codeforall
Copy link
Collaborator

pg_tde_toast_insert_or_update calls pg_tde_deform_tuple on old-tuple from within and tries to dereference the toast columns. Passing the encrypted tuple as part of the old tuple renders the toast data pointer (the encrypted value of the actual pointer) invalid, and anything can happen if it gets dereferenced as it is.
The solution is to pass the decrypted old tuple pg_tde_toast_insert_or_update function from pg_tde_update.

…ona#82)

pg_tde_toast_insert_or_update calls pg_tde_deform_tuple  on old-tuple from
within and tries to dereference the toast columns. Passing the encrypted tuple
as part of the old tuple renders the toast data pointer (the encrypted value
of the actual pointer) invalid, and anything can happen if it gets
dereferenced as it is.
The solution is to pass the decrypted old tuple pg_tde_toast_insert_or_update
function from pg_tde_update.
Copy link
Member

@dAdAbird dAdAbird left a comment

Choose a reason for hiding this comment

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

Can you add test for this? Anyway there is a test scenario in #82

And also reference #82 issue in the commit/PR message

Copy link
Contributor

@hqakhtar hqakhtar left a comment

Choose a reason for hiding this comment

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

LGTM

@hqakhtar hqakhtar merged commit 0a65d3f into percona:main Jan 25, 2024
5 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