Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Interested in the procedure for collecting block write statistics of PostgreSQL 9.2.

Steps followed for configuration, could get blk_read time but not blk_write_time

  1. CREATE EXTENSION adminpack; and CREATE EXTENSION dblink;
  2. Changed postgresql.conf file

    # - Query/Index Statistics Collector -
    track_activities = on
    track_counts = on
    track_io_timing = on
    track_functions = all           # none, pl, all
    track_activity_query_size = 1024    # (change requires restart)
    update_process_title = on
    stats_temp_directory = 'pg_stat_tmp'
    # - Background Writer -
    bgwriter_delay = 200ms          # 10-10000ms between rounds
    bgwriter_lru_maxpages = 100     # 0-1000 max buffers written/round
    bgwriter_lru_multiplier = 2.0       # 0-10.0 multipler on buffers scanned/round
  3. Restarted Postgres Server

  4. Performed around 2000 inserts to table
  5. But could not view the blk_write_time.
share|improve this question

configuration above is correct. Before viewing the blk_write_time, do a vacuum. If you still see a 0 try increasing the inserts from 2000 to say 1000000.

Step 5: vacuum; Step 6: select datname, blk_write_time from pg_stat_database;

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.