PostgreSQL: Database Statistics and Array Coercion Fixes
Two commits address critical bugs in PostgreSQL's statistics system and query planning. The fixes resolve incorrect database OID handling in statistics reporting and prevent crashes during array type coercion in set operations.
Duration: PT1M41S
Episode overview
This episode is a short developer briefing from PostgreSQL.
It explains recent repository work in plain language.
- Show: PostgreSQL
- Published: 2026-04-11T00:00:00Z
- Audio duration: PT1M41S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good morning, this is your PostgreSQL development briefing for April 11th, 2026.
Michael Paquier committed a fix for database OID handling in the statistics system. Three functions in pgstat_database.c were incorrectly ignoring the database OID passed by their callers, instead using MyDatabaseId. While this was harmless for connection and disconnection reporting, it caused real problems with…
Richard Guo addressed a crash in the query planner's array length estimation. The issue occurred when nested set operations required type coercion and the system attempted to examine variables with varno 0, which have no valid relation entry. The estimate_array_length function now skips statistics lookup for these…
Both fixes include comprehensive regression tests to prevent future regressions. The statistics fix adds tests for shared relation counter resets, while the array coercion fix adds union operation test cases.
What's next: Watch for these fixes in upcoming point releases for supported PostgreSQL versions. The statistics fix affects a broad range of versions back to 15, while the array coercion fix targets more recent installations.
That's your PostgreSQL update for today. Back tomorrow…
Nearby episodes from PostgreSQL
- Weekly Recap - Error Handling and Query Correctness
- Build Directory Path Fix
- String Formatting Fix
- Weekly Recap - Bug Fixes and Security Infrastructure
- Weekly Recap - Shared Memory Architecture Overhaul
- Performance Revolution - ARM Acceleration and Smart Index Scanning
- The Great Memory Makeover
- Speed Demons and Smart Optimizations