Adjust assertion in XLogDecodeNextRecord.
Robert Haas <rhaas@postgresql.org>
Adjust assertion in XLogDecodeNextRecord. As written, if you use XLogBeginRead() to position an xlogreader at the beginning of a WAL page and then try to read WAL, this assertion will fail. However, the header comment for XLogBeginRead() claims that positioning an xlogreader at the beginning of a page is valid, and the code here is perfectly able to cope with it. It's only the assertion that causes trouble. So relax it. This is formally a bug in all supported branches, but as it doesn't seem to have any consequences for current uses of the xlogreader facility, no back-patch, at least for now. Dilip Kumar and Robert Haas Discussion: http://postgr.es/m/CA+TgmoaJSs2_7WHW2GzFYe9+zfPtxBKvT3GW47+x=ptUE=cULw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlogreader.c | modified | +4 −3 |
Discussion
- XLogBeginRead's header comment lies 7 messages · 2022-08-16 → 2022-08-18