agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Switch maximum of GUC huge_page_size to MAX_KILOBYTES
Date: Sat, 27 Jun 2026 02:49:34 +0000
Message-ID: <E1wdJ6t-000M2n-0b@gemulon.postgresql.org> (raw)

Switch maximum of GUC huge_page_size to MAX_KILOBYTES

As documented in guc.h, MAX_KILOBYTES is used to cap GUC parameters that
are measured in kilobytes of memory.  This way, size_t values can fit in
builds where sizeof(size_t) is 4 bytes.

Unfortunately, huge_page_size has missed this aspect, causing
calculation failures when setting this GUC to a value higher than
MAX_KILOBYTES, up to INT_MAX.

Oversight in d2bddc2500fb.  No backpatch is done, based on the lack of
complaints.

Reported-by: Daria Shanina <vilensipkdm@gmail.com>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20260626.132415.904994526137946499.horikyota.ntt@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dbaa4dc3c8dd77a0e1c977024d4ae150e00456b3

Modified Files
--------------
src/backend/utils/misc/guc_parameters.dat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Message-ID: <E1wdJ6t-000M2n-0b@gemulon.postgresql.org>
Permalink:  ../E1wdJ6t-000M2n-0b@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wdJ6t-000M2n-0b@gemulon.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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Switch maximum of GUC huge_page_size to MAX_KILOBYTES
  In-Reply-To: <E1wdJ6t-000M2n-0b@gemulon.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox