PostgreSQL: Integer Overflow Cleanup Across the Tree

Today's commits center on fixing subtle integer overflow bugs in string and formatting functions, plus a broader push to standardize overflow-checking code and clean up dead cruft in the crypto library. Two backpatched bug fixes correct wrong query results that have shipped for years.

Duration: PT2M29S

Episode overview

This episode is a short developer briefing from PostgreSQL.

It explains recent repository work in plain language.

  • Show: PostgreSQL
  • Published: 2026-09-01T13:05:19Z
  • Audio duration: PT2M29S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning. It's September 1st, 2026, and this is your PostgreSQL briefing.

The signal today is integer overflow handling. Several commits, independent in origin but united in theme, tighten up how PostgreSQL detects and handles overflow at the extremes of the integer range.

Start with two real bug fixes. Commit a63df26 fixes the right() string function: passing the minimum possible 32-bit integer as a negative length caused a negation overflow, and under certain build settings, returned the entire string instead of an empty one. Commit 3b120b1 fixes a similar class of problem in…

On the maintenance side, commit 8e483af by Michael Paquier swaps hand-rolled overflow checks in numeric and cash-handling code for the newer pg_neg_s32_overflow and pg_neg_s64_overflow helper functions. Testing showed this produces fewer instructions across common compilers, and it's part of a larger cleanup effort…

A secondary theme: cleaning up legacy and dead code. Commit 8534b0b replaces a custom memory-clearing function with the standard explicit_bzero, aligning crypto code with the rest of the tree. Commit a62fa61 removes an unused macro in the Blowfish cipher implementation that referenced a…

Roundin…

Nearby episodes from PostgreSQL

  1. Closing the Coverage Gap on Custom Scans
  2. Weekly Recap - Correctness Fixes and Shared Memory Hardening
  3. Dictionary Parsing Gets Hardened
  4. Correctness Fixes for Query Planning and Shared Memory
  5. Widening Fixes and Planner Corrections Land as Backpatches
  6. Retreat and Repair
  7. Hardening Version 19 Ahead
  8. TOAST Vacuum Fix and Planner Correctness Patches