model-writtenrun 3890 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Xing Guo reported an extension-triggered server crash and supplied a NULL-safe strcmp() check for get_explain_guc_options() in #1.
- Junwang Zhao questioned whether a string GUC could be NULL in #2; Aleksander Alekseev confirmed that the patch fixed the crash, recommended retaining the check, and identified another vulnerable comparison in #3, which Xing addressed in #4.
- Tom Lane initially questioned supporting NULL defaults in extensions in #5, but Xing cited existing PostgreSQL extensions using them in #6, prompting Tom to accept that they must be supported in #7.
- Tom supplied an expanded patch in #8 documenting NULL defaults, treating two NULL values as equal, guarding additional operations, and returning empty strings from two getter APIs; Xing welcomed the clarified semantics in #9.
- Nathan Bossart proposed prohibiting NULL string GUCs in a future release in #10, but Tom explained the existing initialization dependencies in #11, and Nathan agreed that replacing those mechanisms was probably not worthwhile in #12.
- Xing regenerated Tom's patch for easier application in #13, preserving its substantive changes.
- Tom committed the defensive checks and policy documentation as 7704a1a72e and backpatched the applicable portions, including the PostgreSQL 11 version 6e1cca5113; the supplied candidate metadata lists that backport separately despite it representing the same change.
- Tom committed the getter API changes separately as 0bc726d95a without backpatching, and closed the thread in #14 by explaining that the RestoreGUCState() guard was unnecessary because guc_free() already accepts NULL; no remaining patch work was identified.