model-writtenrun 835 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Wang Yuelin reported the pg_surgery off-by-one overflow in #1, and surya poondla reproduced a server crash at the largest legal tuple offset and supplied a tested fix that enlarged the array and added an offset bounds check #2.
- Michael Paquier proposed retaining the array size and converting offsets to zero-based indexes #4, while Ashutosh Sharma favored Surya's approach because direct use of one-based page offsets made the code easier to read #5.
- Michael favored consistency with heapam_handler.c and considered the performance rationale for enlarged arrays elsewhere irrelevant to pg_surgery #6; his replacement patch changed both array accesses and the assertion, leaving out the additional runtime bounds check #7.
- Ashutosh reviewed the replacement and suggested expressing the assertion directly as offno <= MaxHeapTuplesPerPage #8.
- Michael committed #7 with Ashutosh's assertion simplification as 193a4ded94 and announced that the fix had been backpatched through PostgreSQL 14 #9.
- Surya endorsed the zero-based indexing approach and thanked Michael for committing it in the final message, leaving the reported bug resolved with no further work proposed #10.