model-writtenrun 5721 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Mark Murawski reported a PL/Perl crash when a warning handler executed an SPI query during function validation and submitted a patch that tolerated missing current_call_data in plperl_spi_exec() #1.
- Tom Lane could not reproduce the initial example and proposed rejecting SPI operations during validation to prevent side effects; Mark then acknowledged that his patch missed other dependencies on current_call_data #2 #3.
- Mark supplied a revised reproducer that installed the warning handler through an external Perl module #4.
- Tom reproduced the crash and supplied a replacement patch that blocked SPI until a valid function descriptor existed, also guarding transaction commit and rollback; he rejected the original workaround because it bypassed read-only restrictions, missed other dereferences, and allowed potentially unsafe execution during validation #6.
- Tom committed the replacement with additional guards in plperl_sv_to_literal() and plperl_return_next(), documenting the deliberate exception for logging and backpatching to all supported branches #6 638300fef5.
- After the commit, Mark explained that his original testing had used the wrong build and agreed with blocking queries during compilation; Tom confirmed that the fix had already landed, closing the thread with no outstanding patch work #7 #8 638300fef5.