pgsql: Modify pgstats code to reduce performance penalties from - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Modify pgstats code to reduce performance penalties from
Date
Msg-id 20060118203517.200EB9DCA04@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Modify pgstats code to reduce performance penalties from oversized stats data
files: avoid creating stats hashtable entries for tables that aren't being
touched except by vacuum/analyze, ensure that entries for dropped tables are
removed promptly, and tweak the data layout to avoid storing useless struct
padding.  Also improve the performance of pgstat_vacuum_tabstat(), and make
sure that autovacuum invokes it exactly once per autovac cycle rather than
multiple times or not at all.  This should cure recent complaints about 8.1
showing much higher stats I/O volume than was seen in 8.0.  It'd still be a
good idea to revisit the design with an eye to not re-writing the entire
stats dataset every half second ... but that would be too much to backpatch,
I fear.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        vacuum.c (r1.317.2.2 -> r1.317.2.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.317.2.2&r2=1.317.2.3)
    pgsql/src/backend/postmaster:
        autovacuum.c (r1.5.2.3 -> r1.5.2.4)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c.diff?r1=1.5.2.3&r2=1.5.2.4)
        pgstat.c (r1.111.2.1 -> r1.111.2.2)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.111.2.1&r2=1.111.2.2)
    pgsql/src/backend/storage/smgr:
        smgr.c (r1.93.2.1 -> r1.93.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/smgr.c.diff?r1=1.93.2.1&r2=1.93.2.2)
    pgsql/src/include:
        pgstat.h (r1.38 -> r1.38.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h.diff?r1=1.38&r2=1.38.2.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Modify pgstats code to reduce performance penalties from
Next
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: You'll find attached a patch for a fixed explanation on