Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the unit of buffers_checkpoint in pg_stat_bgwriter table?
    primarykey
    data
    text
    <p>I'm using postgreSQL-9.1.6 and trying to build monitoring application for postgreSQL server.</p> <p>I'm planning to select PHYSICAL and LOGICAL I/O stat from <code>pg_stat_*</code> information tables.</p> <p>According to <a href="http://www.postgresql.org/docs/9.1/static/monitoring-stats.html" rel="nofollow">MANUAL</a> unit of fields in <code>PG_STAT_DATABASE</code> is <strong>BLOCK</strong> which means size of <strong>8KB</strong>.</p> <pre><code>postgres=# select * from pg_stat_database where datname='postgres'; -[ RECORD 3 ]-+------------------------------ datid | 12780 datname | postgres numbackends | 2 xact_commit | 974 xact_rollback | 57 blks_read | 210769 blks_hit | 18664177 tup_returned | 16074339 tup_fetched | 35121 tup_inserted | 18182015 tup_updated | 572 tup_deleted | 3075 conflicts | 0 </code></pre> <p>I could figure out size of <code>PHYSICAL READ</code> usging <code>blks_read</code> * 8KB. However, there is no comments on the unit of stats in <code>PG_STAT_BGWRITER</code>.</p> <pre><code>postgres=# select * from pg_stat_bgwriter; -[ RECORD 1 ]---------+------------------------------ checkpoints_timed | 276 checkpoints_req | 8 buffers_checkpoint | 94956 buffers_clean | 0 maxwritten_clean | 0 buffers_backend | 82618 buffers_backend_fsync | 0 buffers_alloc | 174760 stats_reset | 2013-07-15 22:27:05.503125+09 </code></pre> <p>How can I calculate the size of <code>PHYSICAL WRITE</code> through the <code>buffers_checkpoint</code>?</p> <p>Any advice wold be very appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload