postgresql/src/include/storage
Tom Lane d526575f89 Make large sequential scans and VACUUMs work in a limited-size "ring" of
buffers, rather than blowing out the whole shared-buffer arena.  Aside from
avoiding cache spoliation, this fixes the problem that VACUUM formerly tended
to cause a WAL flush for every page it modified, because we had it hacked to
use only a single buffer.  Those flushes will now occur only once per
ring-ful.  The exact ring size, and the threshold for seqscans to switch into
the ring usage pattern, remain under debate; but the infrastructure seems
done.  The key bit of infrastructure is a new optional BufferAccessStrategy
object that can be passed to ReadBuffer operations; this replaces the former
StrategyHintVacuum API.

This patch also changes the buffer usage-count methodology a bit: we now
advance usage_count when first pinning a buffer, rather than when last
unpinning it.  To preserve the behavior that a buffer's lifetime starts to
decrease when it's released, the clock sweep code is modified to not decrement
usage_count of pinned buffers.

Work not done in this commit: teach GiST and GIN indexes to use the vacuum
BufferAccessStrategy for vacuum-driven fetches.

Original patch by Simon, reworked by Heikki and again by Tom.
2007-05-30 20:12:03 +00:00
..
backendid.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
block.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
buf_internals.h Make large sequential scans and VACUUMs work in a limited-size "ring" of 2007-05-30 20:12:03 +00:00
buf.h Make large sequential scans and VACUUMs work in a limited-size "ring" of 2007-05-30 20:12:03 +00:00
buffile.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
bufmgr.h Make large sequential scans and VACUUMs work in a limited-size "ring" of 2007-05-30 20:12:03 +00:00
bufpage.h Suppress useless searches for unused line pointers in PageAddItem. To do 2007-03-02 00:48:44 +00:00
fd.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
freespace.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
ipc.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
item.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
itemid.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
itempos.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
itemptr.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
large_object.h Add lo_truncate() to backend and libpq for large object truncation. 2007-03-03 19:52:47 +00:00
lmgr.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
lock.h Fix trivial misspelling in comment. 2007-05-30 16:16:32 +00:00
lwlock.h Add a multi-worker capability to autovacuum. This allows multiple worker 2007-04-16 18:30:04 +00:00
off.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
pg_sema.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
pg_shmem.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
pmsignal.h Restructure autovacuum in two processes: a dummy process, which runs 2007-02-15 23:23:23 +00:00
pos.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
proc.h Add a multi-worker capability to autovacuum. This allows multiple worker 2007-04-16 18:30:04 +00:00
procarray.h Remove the CheckpointStartLock in favor of having backends show whether they 2007-04-03 16:34:36 +00:00
relfilenode.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
s_lock.h tas() support for Renesas' M32R processor. Kazuhiro Inaoka 2007-05-04 15:20:52 +00:00
shmem.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
sinval.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
sinvaladt.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
smgr.h Extend yesterday's patch so that the bgwriter is also told to forget 2007-01-17 16:25:01 +00:00
spin.h Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00