Skip to content

Conversation

dAdAbird
Copy link
Member

@dAdAbird dAdAbird commented Aug 25, 2025

There is no reason to do durable_unlink before durable_rename. Rename can handle existing file. But with this sequence, the cluster may endup in unrecoverable state should server crash in-between this two ops, as there is going to be no "_keys" at all.
The current sequence may also cause an issue with backups: <durable_unlink>, <pg_basebackup gets a file list>, <durable_rename>. And no "_keys" file in the backup as the result.

Fixes: PG-1896

@jeltz
Copy link
Collaborator

jeltz commented Aug 26, 2025

Seems like a quite serious bug that we should just fix.

There is no reason to do durable_unlink before durable_rename. Rename
can handle existing file. But with this sequence, the cluster may
endup in unrecoverable state should server crash in-between this two
ops, as there is going to be no "_keys" at all.
The current sequence may also cause an issue the backup:
<durable_unlink>, <pg_basebackup gets a file list>, <durable_rename>.
And no "_keys" file in the backup as the result.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.21%. Comparing base (415cb8d) to head (d683a48).

❌ Your project status has failed because the head coverage (82.21%) 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     #549      +/-   ##
=====================================================
- Coverage              82.22%   82.21%   -0.02%     
=====================================================
  Files                     25       25              
  Lines                   3246     3244       -2     
  Branches                 512      512              
=====================================================
- Hits                    2669     2667       -2     
  Misses                   465      465              
  Partials                 112      112              
Components Coverage Δ
access 84.66% <ø> (-0.05%) ⬇️
catalog 87.65% <ø> (ø)
common 77.77% <ø> (ø)
encryption 72.97% <ø> (ø)
keyring 73.21% <ø> (ø)
src 94.18% <ø> (ø)
smgr 96.53% <ø> (ø)
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndersAstrand AndersAstrand changed the base branch from TDE_REL_17_STABLE to release-17.5.3 August 26, 2025 14:04
@dAdAbird dAdAbird merged commit a711d8b into percona:release-17.5.3 Aug 26, 2025
19 checks passed
@dAdAbird dAdAbird deleted the just_rename branch August 26, 2025 14:21
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.

5 participants