2026-05-01 PostgreSQL News Digest
Commits
There were 8 commits today, including important fixes spanning query correctness, security, and robustness.
⭐ Fix nondeterministic collation handling in HAVING-to-WHERE pushdown
Richard Guo
This fixes a planner bug where HAVING clauses could be pushed down into WHERE clauses incorrectly when GROUP BY used nondeterministic collations, potentially producing wrong query results. The issue could exclude rows before grouping and change aggregate results; the fix detects collation conflicts before flatten_group_exprs.
⭐ Fix empty-set handling for JSON_ARRAY(query) and view deparsing
Richard Guo
The SQL/JSON standard requires JSON_ARRAY(query) to return an empty JSON array ([]) when the subquery returns zero rows, but the previous implementation returned NULL. The fix also addresses view deparsing by ruleutils.c, which had been impeded by early parser rewriting.
Fix missing connection validation in ECPG
Andrew Dunstan
This fixes crashes where several ECPG functions, including ECPGdeallocate_all() and ECPGprepared_statement(), could SIGSEGV when called without an established connection. The affected code now checks the return value of ecpg_get_connection() for NULL in line with surrounding style, and new tests were added.
Limit signal sender PID/UID details to server logs
Andrew Dunstan
This addresses a security concern introduced by an errdetail() added in an earlier commit (55890a91945), which could return the OS PID and UID of the process that sent a termination signal directly to clients. The information is now recorded only in server logs for administrator diagnostics and is no longer sent to clients.
⭐ Avoid unbounded blocking when walsender completes shutdown
Fujii Masao
This fixes a case where, during shutdown, walsender could wait indefinitely in pq_flush() for the socket to become writable while sending the final CommandComplete message, preventing wal_sender_shutdown_timeout from taking effect. A new EndCommandEx makes timeout enforcement possible.
Document validation behavior for ALTER INDEX .. ATTACH PARTITION
Michael Paquier
Since commit 9d3e094f12, ALTER INDEX .. ATTACH PARTITION attempts validation when the target index's parent index is invalid, but the documentation did not mention that behavior. The documentation has been updated and backpatched to PostgreSQL 14 and later.
Fix serialization error message for TM_Deleted cases
Amit Langote
This fixes TM_Deleted code paths in ExecLockRows() and ri_LockPKTuple() where the message for a deleted tuple incorrectly referred to a "concurrent update." The wording now reflects a "concurrent delete," and isolation test expected output and cases were updated.
Fix buildfarm failure in sequence subscription tests
Amit Kapila
The sequence subscription tests introduced in commit 2bf6c9ff71 failed on the buildfarm only in Windows environments that do not use Unix sockets because required pg_hba.conf setup was missing. A Windows-specific setup fixes the issue.
HN News
No PostgreSQL-related stories were found on Hacker News for 2026-05-01.
Summary
May 1, 2026 was marked by two important correctness fixes: nondeterministic collation handling for HAVING pushdown and SQL/JSON standard compliance for JSON_ARRAY empty-set behavior. Security and robustness also improved through walsender shutdown timeout enforcement and limiting exposure of signal sender information. Overall, the release cycle continues to focus on quality improvements.
This digest was generated by Claude AI based on Hacker News, GitHub, and the PostgreSQL mailing list.