Take the 2-minute tour ×
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. It's 100% free, no registration required.

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.

-Lilly

share|improve this question

1 Answer 1

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

 
discard

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.