model-writtenrun 4516 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andrey Rachitskiy reported that a parallel query after CREATE USER and SET SESSION AUTHORIZATION in the same transaction could fail because the new role appeared nonexistent, initially observed through psql's relation listing #1.
- Tom Lane traced the failure to restoring GUCs before the leader's snapshot and preferred delaying RestoreGUCState over suppressing catalog lookups outside a transaction; his draft also included an optional session_authorization shortcut and left moving RestoreLibraryState open for investigation #2.
- Andrey confirmed that the draft fixed his reproduction #3, and Tom committed its core snapshot-ordering fix with regression coverage as 68855c0387, dropping the shortcut because it failed to preserve information needed for later GUC restoration #4.
- Buildfarm failures forced the initial fix to be reverted and postponed beyond the imminent minor releases #5; Tom subsequently identified an existing assign_client_encoding error path that violated the requirement that assign hooks must not fail #6.
- Tom's new patch moved rejection into check_client_encoding and allowed the original fix to pass testing when restored #6; David G. Johnston advised against introducing the compatibility risk after beta3 #7, and Tom agreed to target HEAD only #8.
- The client_encoding patch landed as 0ae5b763ea with an additional defensive SetClientEncoding failure check; Tom confirmed that backpatching was deferred because the problematic error path appeared unreachable without the original change #10.
- With the client_encoding prerequisite in place, Tom restored the core fix from #2 as 6e086fa2e7, retaining the regression tests and omission of the session_authorization shortcut; this second landing targeted HEAD only because the changed GUC-hook timing could break extensions.
- Justin Pryzby later reported intermittent missing-attribute errors while clustering pg_attribute with parallel scans, isolating the regression to the session-user fix #11; Tom reproduced it and initially observed missing or duplicate heap pages #12 #13.
- Tom determined that GUC catalog lookups built relcache entries before the worker restored the leader's relation map, causing workers to scan an obsolete physical relation #14; 126ec0bc76 implemented his discussion-only fix by restoring relation-map and reindex state earlier, on HEAD only.
- Noah Misch then found that pending-sync state also had to precede catalog relcache construction and supplied a patch after reproducing an assertion failure under minimal WAL #15; he found no concrete need for backpatching and omitted additional routine test coverage because the relevant reindex test had known deadlock risks.
- The thread ends with Tom accepting Noah's patch #16, which subsequently landed unchanged as 67bab53d64; no attached patch remained awaiting acceptance, while backpatching the later ordering fixes remained deferred.