Re: Patch: raise default for max_wal_segments to 1GB

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: hlinnaka(at)iki(dot)fi
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Venkata Balaji N <nag1010(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Patch: raise default for max_wal_segments to 1GB
Date: 2015-03-03 18:58:42
Message-ID: CADkLM=cAh254172uLf+kh6TBPq9kwPbDF2e+=JgtkQhVOVpdgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Naive question: would it be /possible/ to change configuration to accept
percentages, and have a percent mean "of existing RAM at startup time"?

I ask because most of the tuning guidelines I see suggest setting memory
parameters as a % of RAM available.

On Tue, Mar 3, 2015 at 1:29 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> On 03/03/2015 08:21 PM, Josh Berkus wrote:
>
>> On 03/03/2015 10:15 AM, Josh Berkus wrote:
>>
>>> On 03/02/2015 11:25 PM, Heikki Linnakangas wrote:
>>>
>>>> I propose that we remove the comment from max_wal_size, and also remove
>>>> the "in milliseconds" from wal_receiver_timeout and
>>>> autovacuum_vacuum_cost_delay.
>>>>
>>>
>>> +1
>>>
>>>
>> Actually, let's be consistent about this. It makes no sense to remove
>> unit comments from some settings which accept ms but not others.
>>
>> Do we want to remove unit comments from all settings which accept
>> "MB,GB" or "ms,s,min"? There's more than a few. I'd be in favor of
>> this, but seems like (a) it should be universal, and (b) its own patch.
>>
>
> I think it's a good rule that if the commented-out default in the sample
> file does not contain a unit, then the base unit is in the comment.
> Otherwise it's not. For example:
>
> #shared_buffers = 32MB # min 128kB
> # (change requires restart)
>
> The base unit is BLCKSZ, i.e. 8k, but usually people will usually use
> MB/GB. And that is evident from the default value, 32MB, so there's no need
> to mention it in the comment.
>
> #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
> # 0 selects the system default
>
> Here it's not obvious what the unit should be from the default itself. So
> the comment says it's "in seconds".
>
> - Heikki
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-03-03 19:04:30 Re: Patch: raise default for max_wal_segments to 1GB
Previous Message Greg Stark 2015-03-03 18:57:36 Re: Providing catalog view to pg_hba.conf file - Patch submission