From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid integer wraparound when adding new HASH partition
Date: Tue, 10 Nov 2026 22:51:18 +0000
Message-ID: <E1xQugQ-00000000ERF-3TWx@gemulon.postgresql.org> (raw)
Avoid integer wraparound when adding new HASH partition
Specifying an overly large modulus could result in an integer wraparound
while checking for overlapping partitions when adding a new HASH
partition. Upgrade to 64-bit integers to avoid this.
Bug: #19836
Reported-by: Sumedh Pathak <sumedhpathak@gmail.com>
Author: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/19836-0754d466a59c7d00@postgresql.org
Backpatch-through: 15
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d7e355bc0f921cbef60adf521152790fa53f293e
Modified Files
--------------
src/backend/partitioning/partbounds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: drowley@postgresql.org
Subject: Re: pgsql: Avoid integer wraparound when adding new HASH partition
In-Reply-To: <E1xQugQ-00000000ERF-3TWx@gemulon.postgresql.org>
References: <E1xQugQ-00000000ERF-3TWx@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox