Satoshi Nagayasu wrote:

> As you may know, this file could be handreds of MB in size, because
> pgstat.stat holds all access statistics in each database, and it needs
> to read/write an entire pgstat.stat frequently.
> 
> As a result, pgstat.stat often generates massive I/O operation,
> particularly when having a large number of tables in the database.

We already changed it:

commit 187492b6c2e8cafc5b39063ca3b67846e8155d24
Author: Alvaro Herrera <alvhe...@alvh.no-ip.org>
Date:   Mon Feb 18 17:56:08 2013 -0300

    Split pgstat file in smaller pieces
    
    We now write one file per database and one global file, instead of
    having the whole thing in a single huge file.  This reduces the I/O that
    must be done when partial data is required -- which is all the time,
    because each process only needs information on its own database anyway.
    Also, the autovacuum launcher does not need data about tables and
    functions in each database; having the global stats for all DBs is
    enough.
    
    Catalog version bumped because we have a new subdir under PGDATA.
    
    Author: Tomas Vondra.  Some rework by Álvaro
    Testing by Jeff Janes
    Other discussion by Heikki Linnakangas, Tom Lane.


I don't oppose further tweaking, of course, but I wonder if you are
considering these changes.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
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