]> granicus.if.org Git - postgresql/commit
Modify pgstats code to reduce performance penalties from oversized stats data
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Jan 2006 20:35:16 +0000 (20:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Jan 2006 20:35:16 +0000 (20:35 +0000)
commit0bfd90ff32bb18cc0201a7194cd9bef6d152e802
treeae97eba1ffc0f40b325c3de249bae24535b86a43
parent9e72b3c2c5328d375ca4dad245a3be7b7bd55228
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.
src/backend/commands/vacuum.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/storage/smgr/smgr.c
src/include/pgstat.h