Set huge_page_size on 32bit system

Daria Shanina <vilensipkdm@gmail.com>

From: Daria Shanina <vilensipkdm@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2026-06-25T14:54:46Z
Lists: pgsql-bugs

Attachments

Hi all,

I found an error: on 32bit system (I tested on Debian 6.1.0-32-686-pae #1
SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) i686 GNU/Linux) when we
set huge_page_size = 1 TB postgres process fails with signal SIGFPE when
calculated hugepagesize_local = (Size) huge_page_size * 1024; the value
exceeds max for unsigned int = (2^32 – 1).
I attached a full backtrace and one small fix.

What do you think about this?
Thank you for your attention!

--
Best regards,
Daria Shanina

Commits

  1. Switch maximum of GUC huge_page_size to MAX_KILOBYTES