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

2023-04-18 Thread Junwang Zhao
These gucs are always used with ConvertToXSegs, to calculate the count of wal segments(see the following code snip), and wal_segment_size can be configured by initdb as a value of a power of 2 between 1 and 1024 (megabytes), so I think INT_MAX should be safe here. /* * Convert values of GUCs measu

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

2023-04-18 Thread Tom Lane
Junwang Zhao 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

Use INT_MAX for wal size related gucs's max value

2023-04-18 Thread Junwang Zhao
The wal size related gucs use the MB unit, so we should just use INT_MAX instead of MAX_KILOBYTES as the max value. -- Regards Junwang Zhao 0001-use-INT_MAX-for-wal-size-related-max-value.patch Description: Binary data