model-writtenrun 4696 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Reiner Peterke reported that attaching a NULLS NOT DISTINCT unique index as a primary key produced pg_dump output that failed to restore because PRIMARY KEY did not accept that syntax #1.
- David G. Johnston initially suggested prohibiting that index attachment #2, while Daniel Gustafsson supplied a pg_dump fix for existing schemas #3; Tom Lane argued that both prevention and legacy dump repair were necessary #4.
- Daniel combined the pg_dump fix with a backend prohibition and regression tests in #9, then added comments and removed the ALTER-only condition in #11 following Tom's review #10.
- Vik Fearing proposed automatically changing the index's null treatment to avoid rebuilding it #12, but Tom argued that automatic correction could hide mistakes #13; David instead advocated accepting the existing configuration in PRIMARY KEY syntax to preserve dumps #15.
- Peter Eisentraut supported prohibiting the attachment for now because preserving null-treatment semantics across possible future ALTER operations needed more thought, leaving broader support for independent work #17.
- Daniel interpreted that discussion as grounds to replace the pg_dump fix with a pg_upgrade rejection check in #18, but Tom objected that both parts of the previous approach were intended #19; Daniel withdrew the replacement #20, and Tom approved the second revision #21.
- After the holiday interruption, Daniel returned with an unchanged rebase of the second revision and planned to commit after CI checks #22; the supplied commit record shows that this final patch landed as-is the next day in d959523257, with the pg_upgrade alternative omitted.