model-writtenrun 5950 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed using CURRENT_USER for psql's \password command, displaying the target role, and rejecting empty passwords to prevent accidental password clearing, while asking which changes should be backpatched #1.
- Nathan Bossart supported backpatching the documented current-user behavior but questioned rejecting empty passwords, arguing that the inability to cancel with Control-C was the underlying usability problem #2.
- Tom initially feared that cancellation would require duplicating input code to preserve terminal cleanup, but Nathan proposed optional interrupt support in the existing functions, and Tom suggested keeping simple_prompt() as a wrapper around an extended API #3 #4 #5.
- Nathan extracted the role-selection and role-name prompt changes into two patches, leaving empty-password rejection out; Tom combined them with cosmetic edits and backpatched the result as d6eb5a0c25, retaining authorship credit and thanking Nathan for review #6 #7.
- Nathan then implemented Control-C cancellation for \password by passing an interrupt context down to pg_get_line_append(), identifying \prompt and \connect as future users of the same mechanism #9.
- Tom's review led Nathan to hide the jump-buffer type behind void *, document the signal-handler contract, re-enable interruption for repeated reads, and remove an unnecessary heap allocation after clarifying the longjmp rules #10 #11 #12 #13.
- Tom committed that final submission as 5f1148224b, renaming the context and also improving cancellation failure handling and buffer restoration; extending pg_get_line_buf() was deferred until needed #13 #14 #15.
- Nathan extended cancellation to \prompt and \connect and supplied a newline after canceled echoing prompts; Tom committed this with comment changes as 46d665bc26 #16 #17.
- After Tom raised initdb as another possible user, Nathan verified that its password prompt was already cancelable because signal handlers were installed later, then supplied interrupt-context support for pg_receivewal and pg_recvlogical #17 #18.
- Tom replaced that replication-tool approach with delaying signal-handler installation until after the initial connection, making the fix backpatchable, and included a query-buffer leak fix; cancellation of rare later password prompts was deliberately left unsupported because the added complexity seemed unjustified #19.
- Nathan accepted the simpler approach, and Tom committed the replacement unchanged as 282b6d00ab with backports to all supported branches #20 #21.
- The thread ended with Nathan's thanks after all four changes had landed; empty-password rejection and cancellation of later replication-tool password prompts remained outside the accepted changes #22.