-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compressed TOASTs encryption/decryption (#76)
If TOAST data gets compressed, it has an extended header containing compression info. We used to encrypt this header along with the actual data which in turn caused a crash as PG needs this data in later stages. So it should be taken into account while encrypting data during externalisation. Then, during detoasting, we should not decrypt this compression header as it is being extracted with the data with the first TOAST chunk. So, copy the first N bytes (now it is 4 bytes) of the first chunk as it is and decrypt the rest of the data. Fixes #63
- Loading branch information
Showing
5 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters