Re: confusing checkpoint_flush_after / bgwriter_flush_after

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: confusing checkpoint_flush_after / bgwriter_flush_after
Дата
Msg-id alpine.DEB.2.20.1611251311350.18480@lancre
обсуждение исходный текст
Ответ на confusing checkpoint_flush_after / bgwriter_flush_after  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: confusing checkpoint_flush_after / bgwriter_flush_after
Re: confusing checkpoint_flush_after / bgwriter_flush_after
Список pgsql-hackers
Hello Tomas,

> #checkpoint_flush_after = 0   # 0 disables,
>                              # default is 256kB on linux, 0 otherwise

> I find this pretty confusing, because for all other GUCs in the file, the 
> commented-out value is the default one. In this case that would mean "0", 
> disabling the flushing.
>
> But in practice we use platform-dependent defaults - 256/512K on Linux, 0 
> otherwise. There are other GUCs where the default is platform-specific, but 
> none of them suggests "disabled" is the default state.
>
> 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.

> If that's considered not acceptable, perhaps we should at least improve the 
> comments, so make this clearer.

Yep, what about not putting a value and inverting/adapting the comments, 
maybe something like:
 #checkpoint_flush_after = ...  # default is 256kB on linux, 0 otherwise                                # where 0
disablesflushing
 


-- 
Fabien.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Typo in comment
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: confusing checkpoint_flush_after / bgwriter_flush_after