Re: Use INT_MAX for wal size related gucs's max value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use INT_MAX for wal size related gucs's max value
Date: 2023-04-19 03:33:56
Message-ID: 2881720.1681875236@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Junwang Zhao <zhjwpku(at)gmail(dot)com> writes:
> The wal size related gucs use the MB unit, so we should just use
> INT_MAX instead of MAX_KILOBYTES as the max value.

The point of MAX_KILOBYTES is to avoid overflow when the value
is multiplied by 1kB. It does seem like that might not be
appropriate for these values, but that doesn't mean that we can
blithely go to INT_MAX. Have you chased down how they are used?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2023-04-19 03:51:19 Re: Use INT_MAX for wal size related gucs's max value
Previous Message Junwang Zhao 2023-04-19 03:26:26 Use INT_MAX for wal size related gucs's max value