Re: [PATCH] Cleanup of GUC units code

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] Cleanup of GUC units code
Дата
Msg-id 48C900ED.3010902@gmx.net
обсуждение исходный текст
Ответ на Re: [PATCH] Cleanup of GUC units code  ("Robert Haas" <robertmhaas@gmail.com>)
Ответы Re: [PATCH] Cleanup of GUC units code
Re: [PATCH] Cleanup of GUC units code
Список pgsql-hackers
Robert Haas wrote:
>>> A good start might be to always OUTPUT memory parameters using the
>>> same base unit.
>> SHOW gives output that matches what you input.
> 
> Not for me it doesn't.
> 
> portal=# show temp_buffers;
>  temp_buffers
> --------------
>  1024
> (1 row)
> 
> portal=# set temp_buffers = '16MB';
> SET
> portal=# show temp_buffers;
>  temp_buffers
> --------------
>  2048
> (1 row)

temp_buffers is actually special-cased in the code because
   /*    * We show the GUC var until local buffers have been initialized, and    * NLocBuffer afterwards.    */

It is not clear to me right now why that is a good idea.  But it is only 
this one paramter.

The actual logic that SHOW uses in the general case is to reformat the 
value with the largest unit that allows for an integer value to be 
presented.  So this is neither your nor Greg's idea, but I think it 
gives useful behavior in practice.



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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Transaction Snapshots and Hot Standby
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgresql coding conventions