forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdcd1569
committed
Prevent archive recovery from scanning non-existent WAL files.
Previously when there were multiple timelines listed in the history fileof the recovery target timeline, archive recovery searched all of them,starting from the newest timeline to the oldest one, to find the segmentto read. That is, archive recovery had to continuously fail scanningthe segment until it reached the timeline that the segment belonged to.These scans for non-existent segment could be harmful on the recoveryperformance especially when archival area was located on the remotestorage and each scan could take a long time.To address the issue, this commit changes archive recovery so thatit skips scanning the timeline that the segment to read doesn't belong to.Per discussion, back-patch to all supported versions.Author: Kyotaro Horiguchi, tweaked a bit by Fujii MasaoReviewed-by: David Steele, Pavel Suderevsky, Grigory SmolkinDiscussion:https://postgr.es/m/16159-f5a34a3a04dc67e0@postgresql.orgDiscussion:https://postgr.es/m/20200129.120222.1476610231001551715.horikyota.ntt@gmail.com1 parent7b540f8 commitdcd1569
1 file changed
+26
-1
lines changedLines changed: 26 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3714 | 3714 |
| |
3715 | 3715 |
| |
3716 | 3716 |
| |
3717 |
| - | |
| 3717 | + | |
| 3718 | + | |
3718 | 3719 |
| |
3719 | 3720 |
| |
3720 | 3721 |
| |
3721 | 3722 |
| |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
3722 | 3747 |
| |
3723 | 3748 |
| |
3724 | 3749 |
| |
|
0 commit comments
Comments
(0)