Skip to content

PG-1710 Use temporary files instead of pipes for archive and restore commands #492

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

Merged
merged 3 commits into from
Jul 30, 2025

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Jul 29, 2025

For some to me unknown reason pgbackrest archive-push did not like reading from a pipe so we create a temporary file instead. The location for the temporary file is for now hardcoded to be /dev/shm since that is guaranteed to be on a tmpfs mount on all common Linux distributions. We might in the future want to make this configurable since it is a Linux specific thing.

I tested this with PgBackRest 2.55.0.

@jeltz jeltz requested review from dutow and dAdAbird as code owners July 29, 2025 14:23
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 63.15789% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.75%. Comparing base (01a88bf) to head (6ecf0e1).

❌ Your project status has failed because the head coverage (81.75%) 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     #492      +/-   ##
=====================================================
- Coverage              81.84%   81.75%   -0.10%     
=====================================================
  Files                     24       24              
  Lines                   3002     2987      -15     
  Branches                 490      485       -5     
=====================================================
- Hits                    2457     2442      -15     
+ Misses                   447      444       -3     
- Partials                  98      101       +3     
Components Coverage Δ
access 81.17% <ø> (ø)
catalog 87.85% <ø> (ø)
common 77.77% <ø> (ø)
encryption 73.45% <ø> (ø)
keyring 73.21% <ø> (ø)
src 94.15% <ø> (ø)
smgr 94.85% <ø> (-0.03%) ⬇️
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeltz jeltz force-pushed the tde/archive-restore-tmpfiles branch 2 times, most recently from f69a6dd to 27df780 Compare July 29, 2025 16:00
@dAdAbird
Copy link
Member

There is a typo in the first commit message - usong -> using

The error message did already include the path in the restore command so
this was an oversight.
@jeltz jeltz force-pushed the tde/archive-restore-tmpfiles branch from 27df780 to c81cb87 Compare July 29, 2025 16:23
@jeltz
Copy link
Collaborator Author

jeltz commented Jul 29, 2025

Fixed the typo and improved the commit message.

@jeltz jeltz force-pushed the tde/archive-restore-tmpfiles branch from 3c54f5b to a994c3b Compare July 29, 2025 19:53
jeltz added 2 commits July 30, 2025 15:34
…commands

For some to me unknown reason pgbackrest archive-push did not like
reading from a pipe so we create a temporary file instead. The location
for the temporary file is for now hardcoded to be /dev/shm since that is
guaranteed to be on a tmpfs mount on all common Linux distributions. We
might in the future want to make this configurable since it is a Linux
specific thing.

I tested this with PgBackRest 2.55.0.
There is a cosntant used by PostgreSQL itself.
@jeltz jeltz force-pushed the tde/archive-restore-tmpfiles branch from a994c3b to 6ecf0e1 Compare July 30, 2025 13:34
@jeltz jeltz merged commit f631753 into percona:TDE_REL_17_STABLE Jul 30, 2025
18 of 19 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.

4 participants