Percona-Lab / pg_tde

MIT License
107 stars 19 forks source link

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

Closed codeforall closed 8 months ago

codeforall commented 8 months ago

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.