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.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to