forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5dc093e
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.This commit has been originally pushed as of6860198 for 15 andnewer versions, but not to the older branches. A recent investigationrelated to WAL replay failures has showed up that the lack of this patchin 12~14 is an issue, as we want to be able to improve the WAL reader tomake a correct distinction between the end-of-wal and OOM cases whenvalidating record headers. REL_11_STABLE is left out as it will beEOL'd soon.Reported-by: Yugo NagataAuthor: Yugo Nagata, Kyotaro HoriguchiReviewed-by: Ranier Vilela, Fujii MasaoDiscussion:https://postgr.es/m/20210718045505.32f463ed6c227111038d8ae4@sraoss.co.jpDiscussion:https://postgr.es/m/17928-aa92416a70ff44a2@postgresql.orgBackpatch-through: 121 parent5ab7c53 commit5dc093e
1 file changed
+16
-2
lines changedLines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12299 | 12299 |
| |
12300 | 12300 |
| |
12301 | 12301 |
| |
12302 |
| - | |
| 12302 | + | |
12303 | 12303 |
| |
12304 | 12304 |
| |
12305 | 12305 |
| |
| |||
12322 | 12322 |
| |
12323 | 12323 |
| |
12324 | 12324 |
| |
| 12325 | + | |
| 12326 | + | |
| 12327 | + | |
| 12328 | + | |
| 12329 | + | |
12325 | 12330 |
| |
12326 |
| - | |
| 12331 | + | |
| 12332 | + | |
12327 | 12333 |
| |
| 12334 | + | |
| 12335 | + | |
| 12336 | + | |
| 12337 | + | |
| 12338 | + | |
| 12339 | + | |
| 12340 | + | |
| 12341 | + | |
12328 | 12342 |
| |
12329 | 12343 |
| |
12330 | 12344 |
| |
|
0 commit comments
Comments
(0)