model-writtenrun 9494 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zhang, Jie reported that adding a NOT NULL column with a volatile default alongside ADD PRIMARY KEY USING INDEX triggered premature validation before the table rewrite, and proposed skipping that inner validation when a rewrite was pending #1.
- Sergei Kornilov linked the related bug report thread #68871 and another discussion, explicitly saying he had not reviewed the patch #2.
- Tom Lane rejected the widespread skip-check parameter and supplied a replacement that schedules NOT NULL operations through the outer ALTER TABLE, orders them after column creation and before index creation, and checks existing partition constraints for ALTER TABLE ONLY; this version passed check-world but still lacked new regression cases #3.
- Robert Haas supported targeting PostgreSQL 12 without backpatching, while explicitly disclaiming patch review or risk assessment #4.
- Tom Lane extended the parser-based solution to CREATE TABLE, removed the remaining nested ALTER TABLE, added tests for the original failure, partition behavior, and newly added identity columns, and announced his intention to commit; moving other column-attribute operations between passes remained outside this patch #5.
- The final submission #5 landed unchanged as f4a3fdfbdc, crediting Tom Lane's implementation and Zhang's preliminary version; the commit deferred backpatching because the execution changes warranted more confidence.