model-writtenrun 5268 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas opened the thread by identifying that pg_walinspect reported the first record's LSN even when a later record failed to read, and proposed using xlogreader->EndRecPtr based on the WAL reader's documented behavior #1.
- Bharath Rupireddy supplied master and PostgreSQL 15 patches using EndRecPtr for error reporting, removing ReadNextXLogRecord's first_record argument and an unnecessary assertion #2.
- Robert Haas suggested obtaining the record LSN directly from record->ReadRecPtr #3, and Bharath incorporated that simplification, also removing InitXLogReaderState's output argument #4.
- Robert Haas approved the revised patches in the thread's final message, leaving the fix ready to commit #5.
- Jeff Davis subsequently committed the revised master patch #4 unchanged as d9fbb88629, with the same fix backpatched to PostgreSQL 15.