WIP: PG-1710 Create helpers for decrypting/encrypting archived WAL - #470
Closed
jeltz wants to merge 3 commits into
Closed
WIP: PG-1710 Create helpers for decrypting/encrypting archived WAL#470jeltz wants to merge 3 commits into
jeltz wants to merge 3 commits into
Conversation
jeltz
force-pushed
the
tde/archive-restore-helpers
branch
4 times, most recently
from
July 14, 2025 23:45
7d39ab5 to
7ce48b3
Compare
jeltz
force-pushed
the
tde/archive-restore-helpers
branch
5 times, most recently
from
July 15, 2025 08:27
50e4ea2 to
21e81bc
Compare
Codecov ReportAttention: Patch coverage is
❌ Your project status has failed because the head coverage (82.48%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## TDE_REL_17_STABLE #470 +/- ##
=====================================================
- Coverage 83.68% 82.48% -1.21%
=====================================================
Files 21 24 +3
Lines 2771 2963 +192
Branches 435 483 +48
=====================================================
+ Hits 2319 2444 +125
- Misses 368 421 +53
- Partials 84 98 +14
🚀 New features to boost your workflow:
|
jeltz
force-pushed
the
tde/archive-restore-helpers
branch
16 times, most recently
from
July 16, 2025 13:35
fae342d to
1be237a
Compare
Now that we will soon be adding more bianries having them at the top level only makes things confusing for developers.
To support some common WAL archiving tools, e.g. PgBackRest, we implement an archive_command and a restore_command which can wrap any command and use pipe() to create fake file to either read from or wraite to. The restore command makes sure to write encrypted files if WAL encryption is enabled. It uses the fresh WAL key generated by the server on the current start which works fine because we then just let the first invokation of the restore command set the start LSN of the key. For e.g. PgBackRest you would have the following commands: archive_command = 'pg_tde_archive_decrypt %o pgbackrest --stanza=tde archive-push %p' restore_command = 'pg_tde_restore_encrypt %f %p pgbackrest --stanza=tde archive-get %f "%p"'
jeltz
force-pushed
the
tde/archive-restore-helpers
branch
from
July 25, 2025 02:23
1be237a to
3c43928
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.