model-writtenrun 5476 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Christoph Berg reported that --single-transaction with ON_ERROR_STOP committed a TRUNCATE after a client-side copy failure, and requested fatal handling of client errors when both options are enabled #1 #2.
- Kyotaro Horiguchi proposed choosing COMMIT or ROLLBACK from the command result in an inline patch #3; Michael Paquier requested tests and corrected documentation while warning about unreliable backend-error tests #4, which led to the first attachment #5.
- Michael Paquier committed that attachment as 157f8739ad, expanding tests for successful and failing -c/-f invocations and adding -X; he backpatched the fix through PostgreSQL 10 while keeping tests on HEAD #6.
- Robert Haas warned that changing behavior in a minor release could break existing scripts #8, while David G. Johnston and Michael Paquier defended correcting behavior that could commit changes despite a reported failure #9 #10.
- Tom Lane found that the fix considered only the last command's result when ON_ERROR_STOP was disabled #11; he considered remembering all failures or stopping immediately, but highlighted client-side side effects and opposed shipping the behavioral change in 14.4 #12.
- Michael Paquier accepted withdrawing the backpatch and Tom Lane undertook it #13 #14, reverting the stable-branch changes with db713aa7fc and removing their release-note entry with 18f66a1a91, while leaving the development-branch fix in place.
- Michael Paquier supplied a follow-up delta that rolls back on failure only when ON_ERROR_STOP is enabled, preserving continued processing and issuing COMMIT otherwise; he also added tests and clarified the documentation #16.
- Kyotaro Horiguchi endorsed the new condition #17, and Tom Lane supported committing it during beta on HEAD #18; Michael Paquier landed it as a3ff08e0b0 with additional test coverage.
- Michael Paquier explained that the additional tests record an existing exit-status inconsistency: without ON_ERROR_STOP, a failing final slash command returns failure through -c but success through an existing -f file, and that behavior was left unchanged #20.
- Christoph Berg proposed a dedicated --on-error-stop command-line option to prevent silently ineffective variable-name typos, but the thread contains no implementation of that proposal #21.
- Christoph Berg later judged the corrected code satisfactory and asked what remained before backpatching #22; Michael Paquier answered that compatibility objections remained and more opinions were needed, leaving the refined fix on HEAD and backpatching unresolved #23.