model-writtenrun 9948 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that a valid v18 schema with a parent NO INHERIT not-null constraint and a nullable child incorrectly failed pg_upgrade's consistency check #1.
- Raja Sai pranav reproduced the failure and submitted a query-based fix excluding NO INHERIT constraints, reporting successful upgrades and continued detection of an artificially introduced inconsistency #2.
- Alexander then reported a separate schema-restore failure involving inherited NOT VALID not-null constraints with different names #3.
- Heikki Linnakangas explained that supported v18 clusters cannot develop the inconsistency being checked, supplied a version-guard fix, and called for backpatching through v18, making the query change unnecessary #4.
- Raja tested Heikki's fix against v18 and PG 14 clusters and attached it as the replacement patch; no automated test was added because same-version upgrades would no longer reach the check #5.
- Heikki committed the replacement patch unchanged as 388f2db299, with backports through v18, and announced completion #6; the separate NOT VALID constraint restore failure reported in #3 remains unresolved in this thread.