Re: Set huge_page_size on 32bit system
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: vilensipkdm@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2026-06-26T08:16:23Z
Lists: pgsql-bugs
On Fri, Jun 26, 2026 at 05:13:07PM +0900, Kyotaro Horiguchi wrote: > At Fri, 26 Jun 2026 14:26:31 +0900, Michael Paquier <michael@paquier.xyz> wrote in >> So it seems to me that the mistake is that huge_page_size uses INT_MAX >> as upper bound. We should use MAX_KILOBYTES instead; this definition >> exists to exactly prevent this kind of computation mistake in 32b >> environments. > > Ah, you're right. MAX_KILOBYTES exists for exactly this purpose. Changing the states of the GUC tables in the stable branches would be OK in this case. Now, it took so many years for somebody to complain that setting huge pages at 1TB on a 32b build does not work that I cannot really get excited about a backpatch. So I would just do the switch on HEAD, and call it a day. -- Michael
Commits
-
Switch maximum of GUC huge_page_size to MAX_KILOBYTES
- dbaa4dc3c8dd 19 (unreleased) landed