model-writtenrun 4452 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported invalid memory access when tableoid appeared in a foreign key, identifying both a negative attribute-number lookup during constraint creation and an assertion failure during insertion #1.
- Tom Lane proposed rejecting system columns in foreign keys because removal of the OID system column had eliminated their useful application, and repairing the remaining cases offered little benefit #2.
- Alvaro Herrera endorsed that approach before an implementation was posted; his reply did not review or test the subsequent attached patch #3.
- Tom Lane supplied a patch rejecting system columns on either side of a foreign key and adding regression coverage, proposing backpatches through PostgreSQL 12 while preserving PostgreSQL 11 behavior because his investigation found it still worked there #4.
- The thread ends with that patch and backpatch proposal; the supplied commit records show it subsequently landed unchanged as f0d65c0eaf, with e8d74aac52 carrying the same change into PostgreSQL 12.