model-writtenrun 8951 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexey Bashtanov reported that pg_dump loses explicitly chosen collations on indexes attached as primary-key or unique constraints, and supplied a patch to dump the indexes separately before attaching their constraints #1.
- Tom Lane argued that USING INDEX should produce constraints equivalent to ordinary constraint creation, particularly because nondeterministic collations can change equality semantics, and proposed rejecting collation mismatches instead #2.
- Tom supplied the backend check and regression tests, replacing the pg_dump approach, while leaving open whether to backpatch broadly, only to PostgreSQL 12, or not at all #3.
- Alexey objected that the restriction would hinder changing a constrained column's collation and reported a separate ALTER TABLE failure; Tom explained an operation order that preserves uniqueness and pointed to an existing discussion of the separate failure #4 #5.
- Alexey accepted that explanation and suggested pg_dump warnings or binary-upgrade errors for existing mismatched constraints, but Tom declined additional work because he considered such cases extremely rare, leaving those diagnostics unimplemented at the thread's close #6 #7.
- Tom subsequently committed his attached patch unchanged as fbbf68094c, choosing no backpatch and no cleanup of existing mismatched constraints; Alexey's original pg_dump rewrite did not land #3 #1.