model-writtenrun 3608 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut opened the thread by reporting that pg_get_expr could fail during concurrent table drops and asking whether locking or rearranging regression tests was appropriate #1.
- Tom Lane initially objected that locking relations without checking privileges conflicted with the usual policy, while adding privilege checks would undermine pg_dump's use of the function #2.
- Peter explained that the domain regression test queried an information_schema view while alter_table concurrently dropped a table #3; Tom initially examined domain_constraints, found no pg_get_expr call, and questioned the diagnosis #4.
- Tom corrected his diagnosis after identifying check_constraints as the failing view: pg_get_expr ran before a semijoin restricted the objects, and set_relation_column_names already acquired a transient AccessShareLock, making a longer lock acceptable #5.
- Tom attached a localized fix that opens and locks the relation during deparsing while preserving NULL results for missing relations, declining a broader refactoring to pass the open Relation into lower-level code because it seemed unnecessary #5.
- The thread ends with Tom's proposed patch and no subsequent review replies; it landed unchanged apart from branch context on February 9 in the supplied candidates f38903d1ed and ce571434ae, which represent the same fix and state that it was back-patched to all supported branches.