| From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Cc: | sumedhpathak(at)gmail(dot)com |
| Subject: | BUG #19836: Backend crash with large hash partition modulus |
| Date: | 2026-11-06 17:50:56 |
| Message-ID: | 19836-0754d466a59c7d00@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 19836
Logged by: Sumedh Pathak
Email address: sumedhpathak(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2026-11-06 19:23:11 | BUG #19837: ORDER BY/DISTINCT ON use wrong column with grouping set duplicates |
| Previous Message | PG Bug reporting form | 2026-11-06 17:17:36 | BUG #19835: view with GROUP BY ROLLUP over duplicate columns changes results after dump/restore |