model-writtenrun 123 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Fujii Masao reported five transaction-mode inheritance corner cases: existing cursors bypassed READ ONLY propagation, remote defaults contradicted the documentation, DEFERRABLE failed on old servers, a serializable loopback query could wait indefinitely, and deferred remote triggers could still write after switching to READ ONLY #1.
- Etsuro Fujita added the report to the release open-item list; Nathan Bossart subsequently raised the release deadline and possible reversion, but Etsuro said a fix would follow later #2 #3 #4.
- Etsuro's initial patch synchronized cursor operations and remote commits, explicitly propagated transaction modes, and guarded DEFERRABLE for older servers; he classified the loopback wait as expected behavior and left it unchanged #5.
- Matheus Alcantara found that explicit READ WRITE broke queries against standbys and that creating a remote cursor inside a savepoint could leave stale local cursor state after rollback; Nikolay Samokhvalov supplied an incremental patch that declared the cursor before advancing the remote savepoint #6 #7.
- Etsuro chose to preserve remote defaults and correct the documentation, demonstrated that the cursor failure also existed in older releases, and split the fixes into two patches; because Nikolay's approach missed already-advanced remote savepoints, the cursor patch instead prohibited first fetches at a deeper local nesting level #8 #10 #11.
- Matheus tested and approved the transaction-mode component, but found that the cursor restriction missed sibling savepoints and rejected previously working PL/pgSQL cases; his prototype tracked subtransaction identity and remote depth while delaying synchronization until after cursor declaration #12.
- Etsuro isolated the transaction-mode patch and added deferred-trigger regression coverage in #13, then committed it as d6393fc40a with only test indentation changes; he confirmed the backpatch and closed the release open item while retaining cursor handling as a live issue #14.
- Nikolay demonstrated that parameter evaluation could advance the remote savepoint after the prototype's depth check, still destroying the cursor on rollback; Etsuro confirmed that work on the remaining cursor issue would continue in this thread #16 #17.
- Etsuro rejected the depth-check prototype and replaced the cursor restriction with a scan registry and transaction callbacks that tracked cursor loss, while questioning whether the larger fix should be limited to the development branch #18.
- Matheus's testing exposed crashes for pushed-down joins and stale registry entries after failed portals, plus unnecessary restrictions on buffered rows and rescans; Etsuro accepted those behavior changes and better diagnostics while retaining ERRCODE_FEATURE_NOT_SUPPORTED #19 #20.
- Matheus supplied a complete revision adding memory-context cleanup, safe diagnostics, buffered-row preservation, recovery through rescans, and tests covering joins, failed portals, nested savepoints, parameter evaluation, PL/pgSQL, and asynchronous scans #21.
- The transaction-mode fix was landed, but cursor handling remained uncommitted at the thread's end: Etsuro deferred review to the PostgreSQL 20 development cycle and chose master-only treatment because the patch was invasive and the longstanding issues lacked field reports, with Matheus agreeing #22 #23.