Re: confusing checkpoint_flush_after / bgwriter_flush_after

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: confusing checkpoint_flush_after / bgwriter_flush_after
Date: 2016-11-25 16:22:45
Message-ID: 8dfac45b-4a53-f295-44e2-91c08dc30dbe@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/25/2016 04:40 PM, Fabien COELHO wrote:
>
> Hello Tomas,
>
>>>> While the 9.6 cat is out of the bag, I think we can fix this quite
>>>> easily - use "-1" to specify the default value should be used, and use
>>>> that in the sample file. This won't break any user configuration.
>>>
>>> Although I understand the issue, I'm not sure about -1 as a special
>>> value to mean the default.
>>
>> Why? We use wal_buffers=-1 to use the default (depending on the size
>> of shared_buffers), for example.
>
> Indeed. Just my 0.02€:
>
> ISTM that the use of -1 is not very consistent, as it may mean:
>
> - default: autovacuum_work_mem, wal_buffers
>
> - disable: temp_file_limit, old_snapshot_limit,
> max_standby_*_delay, log_min_duration_statement
>
> And sometimes disable is the default, but not always:-) Basically I'm
> not sure that adding some more confusion around that helps much...
>

Well, the inconsistency is already there. Some GUCs use -1 as "use
default value" and others using it as "disable". Picking one of those
does not really increase the confusion, and it fixes the issue of having
a default mismatching the commented-out example.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-11-25 16:24:37 Re: proposal: session server side variables
Previous Message Fabien COELHO 2016-11-25 15:40:10 Re: confusing checkpoint_flush_after / bgwriter_flush_after