Re: [HACKERS] increasing the default WAL segment size - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] increasing the default WAL segment size
Date
Msg-id CA+TgmoZ=W_UWM+k3KFPd-ORrDGVWyVUry+0QHC3ShQ4Vc9pTvw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] increasing the default WAL segment size  (Beena Emerson <memissemerson@gmail.com>)
List pgsql-hackers
On Fri, Mar 17, 2017 at 2:08 AM, Beena Emerson <memissemerson@gmail.com> wrote:
> The option was intended to only accept values in MB as the original  config
> --with-wal-segsize option, unfortunately, the patch does not throw error as
> in the config option when the units are specified.

Yeah, you want to use strtol(), so that you can throw an error if
*endptr isn't '\0'.

> Error with config option --with-wal-segsize=1MB
> configure: error: Invalid WAL segment size. Allowed values are
> 1,2,4,8,16,32,64.
>
> Should we imitate this behaviour and just add a check to see if it only
> contains numbers? or would it be better to allow the use of the units and
> make appropriate code changes?

I think just restricting it to numeric values would be fine.  If
somebody wants to do the work to make it accept a unit suffix, I don't
have a problem with that, but it doesn't seem like a must-have.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label
Next
From: Yugo Nagata
Date:
Subject: Re: [HACKERS] [POC] hash partitioning