Skip to content

fix(postgresql): filter PITR restore archive objects - #3401

Draft
weicao wants to merge 2 commits into
easton/pg-pitr-restore-recovery-time-failfastfrom
easton/pg-pitr-restore-object-filter
Draft

fix(postgresql): filter PITR restore archive objects#3401
weicao wants to merge 2 commits into
easton/pg-pitr-restore-recovery-time-failfastfrom
easton/pg-pitr-restore-object-filter

Conversation

@weicao

@weicao weicao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What

Skip compressed repository objects unless their basename is a PostgreSQL WAL segment or timeline-history archive before PITR pull and inspection.

Why

The restore traversal accepted every name containing .zst. An unrelated object ordered between the local start WAL and the next valid segment could be pulled, inspected, mistaken for the target boundary, and cause the real WAL to be skipped while preparation returned success.

Tests

  • RED (62e5df853): Bash 3.2 focused ShellSpec, 16 examples / 1 failure / 2 failed assertions
  • GREEN: Bash 3.2 focused ShellSpec, 16 examples / 0 failures
  • GREEN: Bash 5.3 full PostgreSQL ShellSpec, 284 examples / 0 failures
  • ShellCheck error severity, Bash syntax, and git diff --check
  • helm lint addons/postgresql: 1 chart / 0 failures
  • helm template: 41 documents / 1,014,308 bytes

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (9fd582d) to head (8b549e1).

Files with missing lines Patch % Lines
...ns/postgresql/scripts-ut-spec/pitr_restore_spec.sh 0.00% 8 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                              @@
##           easton/pg-pitr-restore-recovery-time-failfast   #3401   +/-   ##
=============================================================================
  Coverage                                           0.00%   0.00%           
=============================================================================
  Files                                                195     195           
  Lines                                              28372   28380    +8     
=============================================================================
- Misses                                             28372   28380    +8     

☔ 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