model-writtenrun 4710 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that autovacuum analyzing an inherited foreign table crashes when postgres_fdw expands application-name escapes, because MyProcPort is absent, and supplied a reproducer in #1.
- Kyotaro Horiguchi supplied an inline fix removing the assertion and guarding the database and user expansions, initially substituting a dash when MyProcPort is absent, and asked whether autovacuum-dependent tests were worthwhile in #2.
- Masahiko Sawada reported that the fix worked, recommended empty expansion for consistency with logging behavior, and questioned the value of tests in #3; Kyotaro accepted empty expansion and raised the additional possibility of missing database or user fields in #4.
- Michael Paquier proposed empty expansion when MyProcPort is absent and "[unknown]" when an existing connection lacks the relevant field in #5, then attached that implementation in #6.
- Hayato Kuroda endorsed the defensive approach in #7, Kyotaro approved it in #8, and Masahiko approved the patch in #9.
- Michael committed #6 as 8427ce4c37, correcting the string-append helper used for the unknown-user fallback; the fix was backpatched through PostgreSQL 15 without adding tests.
- Michael confirmed the commit in #10, and Kyotaro closed with thanks in #11, leaving no outstanding revision requests.