model-writtenrun 5648 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund discovered that NULL input crashed pg_stat_get_replication_slot() in HEAD and PostgreSQL 14, and that pg_stat_get_subscription_stats() also incorrectly accepted NULL in HEAD; he proposed strictness fixes, a stable-branch code check, and broader ways to detect such mistakes #1.
- Tom Lane emphasized missing test coverage and the difficulty of automatically testing multi-argument functions, while Andres explained that pass-by-value arguments could silently produce bogus results instead of crashing #2, #3.
- Vignesh C reproduced the replication-slot problem and submitted HEAD and PostgreSQL 14 patches, reporting that strictness fixed it and asking whether existing PostgreSQL 14 installations also needed an explicit check #4.
- Amit Kapila recommended strictness for both functions in HEAD, requested the missing subscription fix and test, and argued for a C-level replication-slot check in PostgreSQL 14 #5.
- Andres proposed placing both NULL-input tests in src/test/regress/sql/stats.sql and considered also correcting stable-branch catalogs, but Tom argued that the necessary C-level check made that catalog change unnecessary and confusing #6, #7.
- Masahiko Sawada explained that asserting non-NULL arguments inside PG_GETARG_DATUM() would conflict with existing callers that retrieve values before separately checking nullness; the thread produced no general assertion change #8.
- Andres committed the replication-slot fix with strictness and regression coverage in HEAD, using an explicit NULL check for PostgreSQL 14 43a7dc96eb, then separately committed subscription strictness and its regression test da4b56662f.
- Andres announced both fixes and clarified that he had already implemented them locally before Vignesh's submission; Amit's final acknowledgment closed the thread with both concrete bugs fixed and the broader detection ideas unresolved #9, #10.