out of date bufmgr README
While reading through src/backend/storage/buffer/README, I noticed that
the following text seems to no longer be correct:
As of 7.1, the only operation that removes tuples or compacts
free space is (oldstyle) VACUUM. It does not have to implement
rule #5 directly, because it instead acquires exclusive lock at
the relation level, which ensures indirectly that no one else is
accessing pages of the relation at all.
To implement concurrent VACUUM we will need to make it obey rule
#5 fully. To do this, we'll create a new buffer manager
operation LockBufferForCleanup() that gets an exclusive lock and
then checks to see if the shared pin count is currently 1. If
not, it releases the exclusive lock (but not the caller's pin)
and waits until signaled by another backend, whereupon it tries
again. The signal will occur when UnpinBuffer decrements the
shared pin count to 1. As indicated above, this operation might
have to wait a good while before it acquires lock, but that
shouldn't matter much for concurrent VACUUM. The current
implementation only supports a single waiter for pin-count-1 on
any particular shared buffer. This is enough for VACUUM's use,
since we don't allow multiple VACUUMs concurrently on a single
relation anyway.
Could someone who's aware of the bufmgr changes made for 7.2's lazy
VACUUM comment on how this should be updated?
-Neil
Neil Conway <neilc@samurai.com> writes:
Could someone who's aware of the bufmgr changes made for 7.2's lazy
VACUUM comment on how this should be updated?
The only problem with it is that the future tense should be replaced by
the present tense ;-). Done --- thanks for noting the problem.
regards, tom lane