model-writtenrun 8917 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Janes reported that interrupting psql's \watch with Ctrl-C caused a subsequent invocation to produce no output and stop looping, and bisected the regression to the cancellation refactoring #1.
- Michael Paquier initially proposed eliminating cancel_pressed and using CancelRequested throughout psql and result printing #3; Jeff confirmed the fix worked #4, and Fabien COELHO reported successful application, compilation, and testing #5.
- Tom Lane questioned the flag's naming, clearing, callback behavior, and missing volatile qualifier #6; Fabien defended the CancelRequested name, identified resets added by the patch, and agreed that volatile was appropriate #7.
- Michael concluded that the flags represent different events: psql must record cancellation attempts even when backend cancellation fails, whereas CancelRequested tracks successful cancellation when a cancellation object exists #8. His replacement patch retained both flags, restored psql's previous behavior on Unix and Windows, and declared both flags volatile sig_atomic_t after testing on Linux and a Windows console #8.
- Michael committed the replacement patch #8 with only a shortened callback comment as 5d43c3c54d, resolving the reported regression.
- The thread ended with Michael confirming the fix and leaving flag unification for later analysis because --single-step and related execution paths depend on distinguishing cancellation attempts from successful cancellation #9.