Skip to content

Commit

Permalink
Fix issue-153: Server crash and database corruption (#165)
Browse files Browse the repository at this point in the history
* Fix issue-153: Server crash and database corruption

We can't use the Tuple CID as an IV because it changes when the tuple is deleted.
If we have a trigger function that needs the deleted tuple, it will get the
wrong IV when decrypting. This happens because the CID used to encrypt the tuple
(during INSERT/UPDATE) is different from the CID passed to the decryption
function (during delete).

To fix this, we need to stop using the CID for IV calculation.

* Update test case to produce same result on all environment
  • Loading branch information
codeforall authored Apr 2, 2024
1 parent 25b7794 commit 50b55b7
Show file tree
Hide file tree
Showing 5 changed files with 1,072 additions and 7 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ move_large_tuples \
non_sorted_off_compact \
update_compare_indexes \
pgtde_is_encrypted \
test_issue_153_fix \
multi_insert \
trigger_on_view \
insert_update_delete \
Expand Down
Loading

0 comments on commit 50b55b7

Please sign in to comment.