Just-in-time background writing strategy. This code avoids re-scanning
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Sep 2007 20:03:38 +0000 (20:03 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Sep 2007 20:03:38 +0000 (20:03 +0000)
commitd9211554c3a8527a7174d4a353812d7093eb5ebe
tree7dbe9a188a349d3e1cb5eaaa0c141a742ed63624
parent8e5d4be7f056d47a016a33a469b68a6e1ed8ad26
Just-in-time background writing strategy.  This code avoids re-scanning
buffers that cannot possibly need to be cleaned, and estimates how many
buffers it should try to clean based on moving averages of recent allocation
requests and density of reusable buffers.  The patch also adds a couple
more columns to pg_stat_bgwriter to help measure the effectiveness of the
bgwriter.

Greg Smith, building on his own work and ideas from several other people,
in particular a much older patch from Itagaki Takahiro.
16 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/bgwriter.c
src/backend/postmaster/pgstat.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/pgstat.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/test/regress/expected/rules.out