Re: Explain buffers display units.

Greg Smith <greg@2ndquadrant.com>

From: Greg Smith <greg@2ndquadrant.com>
To: Greg Stark <stark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>, "<pgsql-hackers@postgresql.org>" <pgsql-hackers@postgresql.org>
Date: 2010-02-16T00:37:39Z
Lists: pgsql-hackers
Greg Stark wrote:
> We do *not* display raw block numbers anywhere else. Generally I think
> we should have a policy of outputing human-readable standard units of
> memory whenever displaying a memory quantity. Actually I thought we
> already had that policy, hence things like...
>   

The first counter example I thought of is log_checkpoints which looks 
like this:

LOG: checkpoint complete: wrote 133795 buffers (25.5%); 0 transaction 
log file(s) added, 0 removed, 98 recycled; write=112.281 s, sync=108.809 
s, total=221.166 s

>  Probably the XML schema should include the units as an attribute for
> each tag so tools don't have to hard-code knowledge about what unit
> each tag is in.
>   

I don't know if it's practical at this point, but it might be helpful 
for the truly machine-targeted output formats to include specifically 
BLCKSZ somewhere in their header--just so there's a universal way to 
interpret the output even if the user tuned that.

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us