Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4240d2b

Browse files
committed
Update future-tense comments in README to present tense. Noted by
Neil Conway.
1 parent4730946 commit4240d2b

File tree

1 file changed

+16
-17
lines changed
  • src/backend/storage/buffer

1 file changed

+16
-17
lines changed

‎src/backend/storage/buffer/README

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$Header: /cvsroot/pgsql/src/backend/storage/buffer/README,v 1.3 2001/09/29 04:02:22 tgl Exp $
1+
$Header: /cvsroot/pgsql/src/backend/storage/buffer/README,v 1.4 2003/10/31 22:48:08 tgl Exp $
22

33
Notes about shared buffer access rules
44
--------------------------------------
@@ -79,20 +79,19 @@ it won't be able to actually examine the page until it acquires shared
7979
or exclusive lock.
8080

8181

82-
As of 7.1, the only operation that removes tuples or compacts free space is
83-
(oldstyle) VACUUM. It does not have to implement rule #5 directly, because
84-
it instead acquires exclusive lock at the relation level, which ensures
85-
indirectly that no one else is accessing pages of the relation at all.
82+
VACUUM FULL ignores rule #5, because it instead acquires exclusive lock at
83+
the relation level, which ensures indirectly that no one else is accessing
84+
pages of the relation at all.
8685

87-
To implementconcurrent VACUUMwe will need to make it obeyrule #5 fully.
88-
To do this, we'll create a new buffer manager operation
89-
LockBufferForCleanup() that gets an exclusive lock and then checks to see
90-
if the shared pincount is currently 1. If not, it releases the exclusive
91-
lock (but not thecaller's pin) and waits until signaled by another backend,
92-
whereupon ittries again. The signal will occur when UnpinBuffer
93-
decrements the sharedpin count to 1. As indicated above, this operation
94-
might have to wait agood while before it acquires lock, but that shouldn't
95-
matter much forconcurrent VACUUM. The current implementation only
96-
supports a singlewaiter for pin-count-1 on any particular shared buffer.
97-
This is enoughfor VACUUM's use, since we don't allow multiple VACUUMs
98-
concurrently on asingle relation anyway.
86+
Plain (concurrent) VACUUMmust respectrule #5 fully. Obtaining the
87+
necessary lock is done by the bufmgr routine LockBufferForCleanup().
88+
It first gets an exclusive lock and then checks to see if the shared pin
89+
count is currently 1. If not, it releases the exclusive lock (but not the
90+
caller's pin) and waits until signaled by another backend, whereupon it
91+
tries again. The signal will occur when UnpinBuffer decrements the shared
92+
pin count to 1. As indicated above, this operation might have to wait a
93+
good while before it acquires lock, but that shouldn't matter much for
94+
concurrent VACUUM. The current implementation only supports a single
95+
waiter for pin-count-1 on any particular shared buffer. This is enough
96+
for VACUUM's use, since we don't allow multiple VACUUMs concurrently on a
97+
single relation anyway.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp