Re: BUG #19836: Backend crash with large hash partition modulus

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: sumedhpathak(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19836: Backend crash with large hash partition modulus
Date: 2026-11-10 22:51:47
Message-ID: CAApHDvp2fVRTOoS7ynk8ETwgiZ-smOkm7eN8qRm59t48yqGqUg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 9 Nov 2026 at 13:10, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> @@ -2919,8 +2919,8 @@ check_new_partition_bound(char *relname, Relation parent,
>
> if (partdesc->nparts > 0)
> {
> - int
> greatest_modulus;
> - int remainder;
> + int64 greatest_modulus;
> + int64 remainder;
>
> That'll prevent the wrap and allow the do/while loop to terminate when
> remainder is >= greatest_modulus. Bumping greatest_modulus isn't
> really required, but I did that because I thought it was neater to
> keep them the same size.
>
> I can patch this when the freeze is over.

Pushed.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2026-11-10 23:30:27 Re: BUG #19714: pgcrypto pgp_sym_encrypt accepts nonnumeric s2k-mode as mode 0
Previous Message Michael Paquier 2026-11-10 22:33:30 Re: BUG #19849: queries fail after ANALYZE with expression stats on arrays