> This v8 is changed in... > > - Added tests to 011_crash_recovery.pl > > - Fixed a bug that server emits "end-of-wal" messages even if it have > emitted an error message for the same LSN. > > - Changed XLogReaderValidatePageHeader() so that it recognizes an > empty page as end-of-WAL. > > - Made pg_waldump conscious of end-of-wal. > > While doing the last item, I noticed that pg_waldump shows the wrong > LSN as the error position. Concretely it emits the LSN of the last > sound WAL record as the error position. I will post a bug-fix patch > for the issue after confirmation.
I noticed that I added a useless error message "garbage record header", but it is a kind of invalid record length. So I removed the message. That change makes the logic for EOW in ValidXLogRecordHeader and XLogReaderValidatePageHeader share the same flow.