forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6860198
committed
Make recovery report error message when invalid page header is found.
Commit0668719 changed XLogPageRead() so that it validated the pageheader, if invalid page header was found reset the error message andretried reading the page, to fix the scenario where streaming standbygot stuck at a continuation record. This change hid the error messageabout invalid page header, which would make it harder for users toinvestigate what the actual issue was found in WAL.To fix the issue, this commit makes XLogPageRead() report the errormessage when invalid page header is found.When not in standby mode, an invalid page header should cause recoveryto end, not retry reading the page, so XLogPageRead() doesn't need tovalidate the page header for the retry. Instead, ReadPageInternal() shouldbe responsible for the validation in that case. Therefore this commitchanges XLogPageRead() so that if not in standby mode it doesn't validatethe page header for the retry.Reported-by: Yugo NagataAuthor: Yugo Nagata, Kyotaro HoriguchiReviewed-by: Ranier Vilela, Fujii MasaoDiscussion:https://postgr.es/m/20210718045505.32f463ed6c227111038d8ae4@sraoss.co.jp1 parentf3fec23 commit6860198
1 file changed
+16
-2
lines changedLines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12423 | 12423 |
| |
12424 | 12424 |
| |
12425 | 12425 |
| |
12426 |
| - | |
| 12426 | + | |
12427 | 12427 |
| |
12428 | 12428 |
| |
12429 | 12429 |
| |
| |||
12447 | 12447 |
| |
12448 | 12448 |
| |
12449 | 12449 |
| |
| 12450 | + | |
| 12451 | + | |
| 12452 | + | |
| 12453 | + | |
| 12454 | + | |
12450 | 12455 |
| |
12451 |
| - | |
| 12456 | + | |
| 12457 | + | |
12452 | 12458 |
| |
| 12459 | + | |
| 12460 | + | |
| 12461 | + | |
| 12462 | + | |
| 12463 | + | |
| 12464 | + | |
| 12465 | + | |
| 12466 | + | |
12453 | 12467 |
| |
12454 | 12468 |
| |
12455 | 12469 |
| |
|
0 commit comments
Comments
(0)