model-writtenrun 5010 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- 赵其桂 reported that calling a stored procedure containing ROLLBACK through JDBC could trigger an assertion in a debug build with assertions enabled #1.
- 赵其桂 traced the failure to cached-plan memory being released before pg_stat_statements read the statement location and length from PlannedStmt #1.
- The attached patch copied both fields into local variables before utility execution and used those copies when collecting statistics #1.
- Tom Lane agreed with the diagnosis and thanked the author for the patch in the thread's final message #2.
- Tom Lane subsequently committed the fix with local-variable renaming, formatting adjustments, and an explanatory lifetime warning, and backpatched it to all supported versions 495e73c207; the sole submitted patch #1 landed with no outstanding work identified in the thread.