Skip to content

fix(postgresql): commit empty PITR purge scans - #3389

Draft
weicao wants to merge 4 commits into
easton/pg-pitr-reconciliation-contiguousfrom
easton/pg-pitr-empty-purge-checkpoint
Draft

fix(postgresql): commit empty PITR purge scans#3389
weicao wants to merge 4 commits into
easton/pg-pitr-reconciliation-contiguousfrom
easton/pg-pitr-empty-purge-checkpoint

Conversation

@weicao

@weicao weicao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • advance the PITR retention checkpoint after a due purge succeeds, including scans with no expired WAL objects
  • preserve the prior checkpoint when the 600s retention interval has not elapsed
  • keep list, delete, stat, and metadata publication failures retryable at the prior checkpoint

TDD evidence

  • Initial RED 8104af929: 57 examples, 1 failure - a due empty scan left the checkpoint stale
  • Initial fix c9ffc0237
  • Repair RED 24a9aae33: 58 examples, 1 failure - the initial fix advanced the checkpoint before the interval elapsed
  • Final fix a758cda56: focused 58 examples, 0 failures
  • PostgreSQL ShellSpec with Bash 5: 271 examples, 0 failures
  • ShellCheck severity error: clean
  • Bash 5 syntax: clean
  • git diff --check: clean
  • helm lint addons/postgresql: 1 chart, 0 failures
  • Helm render: 41 documents, 1,012,250 bytes

Behavior

Before 600 seconds elapse, the checkpoint remains unchanged and no repository call runs. Once due, an empty successful expiration scan commits the current checkpoint so the archive loop waits for the next interval instead of rescanning on every tick.

@weicao
weicao requested review from a team, ldming and leon-ape as code owners August 16, 2026 13:02
@codecov-commenter

codecov-commenter commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (66953d5) to head (a758cda).

Files with missing lines Patch % Lines
...ons/postgresql/scripts-ut-spec/pitr_backup_spec.sh 0.00% 17 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           easton/pg-pitr-reconciliation-contiguous   #3389   +/-   ##
========================================================================
  Coverage                                      0.00%   0.00%           
========================================================================
  Files                                           195     195           
  Lines                                         28239   28256   +17     
========================================================================
- Misses                                        28239   28256   +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weicao
weicao marked this pull request as draft August 17, 2026 03:44
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.

2 participants