pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: sumedhpathak@gmail.com
Subject: BUG #19836: Backend crash with large hash partition modulus
Date: Fri, 06 Nov 2026 17:50:56 +0000
Message-ID: <19836-0754d466a59c7d00@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19836
Logged by:          Sumedh Pathak
Email address:      sumedhpathak@gmail.com
PostgreSQL version: 19rc1
Operating system:   MacOS
Description:        

Hi,

The following SQL crashes PostgreSQL 20devel (72b9498df9a, macOS ARM64):
CREATE TABLE parent (i integer) PARTITION BY HASH (i);
CREATE TABLE p0 PARTITION OF parent
  FOR VALUES WITH (MODULUS 3, REMAINDER 0);
CREATE TABLE p1 PARTITION OF parent
  FOR VALUES WITH (MODULUS 2147483646, REMAINDER 2);

The third statement causes a crash and server recovery. In
check_new_partition_bound(), remainder += spec->modulus overflows signed int
(2 + 2147483646), leading to an out-of-bounds lookup. The crash was verified
on PG 17,18 as well, but it seems like it exists since PG11.

Thanks.








view thread (3+ messages)  latest in thread

Message-ID: <19836-0754d466a59c7d00@postgresql.org>
Permalink:  ../19836-0754d466a59c7d00@postgresql.org/
Also on:    postgresql.org/message-id/19836-0754d466a59c7d00@postgresql.org

 · 

reply

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, sumedhpathak@gmail.com
  Subject: Re: BUG #19836: Backend crash with large hash partition modulus
  In-Reply-To: <19836-0754d466a59c7d00@postgresql.org>
  References: <19836-0754d466a59c7d00@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