Skip to content

fix(postgresql): retain current PITR timeline history - #3403

Draft
weicao wants to merge 2 commits into
easton/pg-pitr-restore-history-skip-waldumpfrom
easton/pg-pitr-restore-current-history
Draft

fix(postgresql): retain current PITR timeline history#3403
weicao wants to merge 2 commits into
easton/pg-pitr-restore-history-skip-waldumpfrom
easton/pg-pitr-restore-current-history

Conversation

@weicao

@weicao weicao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What

Exempt recognized PostgreSQL timeline-history archives from the WAL start-boundary comparison during PITR traversal.

Why

A timeline-history basename such as 00000002.history sorts below a timeline-2 WAL segment such as 000000020000000000000001. Applying the segment comparison first silently skipped the required current timeline history while still pulling the segment and returning success.

Tests

  • RED (960b4ebf3): Bash 3.2 focused ShellSpec, 18 examples / 1 failure / 2 failed assertions
  • GREEN: Bash 3.2 focused ShellSpec, 18 examples / 0 failures
  • GREEN: Bash 5.3 full PostgreSQL ShellSpec, 286 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,451 bytes

@weicao
weicao requested review from a team, ldming and leon-ape as code owners August 16, 2026 23:20
@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 (30566f4) to head (27005b6).

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-history-skip-waldump   #3403   +/-   ##
===========================================================================
  Coverage                                         0.00%   0.00%           
===========================================================================
  Files                                              195     195           
  Lines                                            28389   28397    +8     
===========================================================================
- Misses                                           28389   28397    +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