forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaf246c3
committed
Fix lastReplayedEndRecPtr calculation when starting from shutdown checkpoint.
When entering crash recovery followed by archive recovery, and the latestcheckpoint is a shutdown checkpoint, and there are no more WAL records toreplay before transitioning from crash to archive recovery, we would notimmediately allow read-only connections in hot standby mode even if wecould. That's because when starting from a shutdown checkpoint, we setlastReplayedEndRecPtr incorrectly to the record before the checkpointrecord, instead of the checkpoint record itself. We don't run the redoroutine of the shutdown checkpoint record, but starting recovery from itgoes through the same motions, so it should be considered as replayed.Reported by Kyotaro HORIGUCHI. All versions with hot standby are affected,so backpatch to 9.0.1 parenteb93316 commitaf246c3
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6846 | 6846 |
| |
6847 | 6847 |
| |
6848 | 6848 |
| |
6849 |
| - | |
| 6849 | + | |
| 6850 | + | |
6850 | 6851 |
| |
6851 | 6852 |
| |
6852 |
| - | |
| 6853 | + | |
| 6854 | + | |
| 6855 | + | |
| 6856 | + | |
6853 | 6857 |
| |
6854 |
| - | |
6855 |
| - | |
| 6858 | + | |
| 6859 | + | |
6856 | 6860 |
| |
6857 | 6861 |
| |
6858 | 6862 |
| |
|
0 commit comments
Comments
(0)