model-writtenrun 2661 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Karina Litskevich reported that backpatching had left an unchecked malloc call in PostgreSQL versions before 16 and supplied a patch for REL_15_STABLE, noting that older versions also needed the fix #1.
- Tom Lane confirmed the report #2 and committed Karina's NULL check with only a whitespace adjustment as cd1c8b992e.
- Maxim Orlov then raised a separate allocation-failure issue in BackendInitialize for PostgreSQL 16 and older, proposing pstrdup instead of strdup for remote_host and remote_port #3.
- Maxim acknowledged that his previous patch was wrong and supplied a revision using MemoryContextStrdup with TopMemoryContext for those fields and remote_hostname #4.
- At the thread's end, Karina's postgres.c fix had landed in cd1c8b992e, while Maxim's revised postmaster.c fix remained proposed with no review or landing shown after #4.