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

Commit8ff80c1

Browse files
committed
Remove obsolete comment about VACUUM FULL: it takes buffer content locks
now, and must do so to ensure bgwriter doesn't write a page that is inprocess of being compacted.
1 parent1758b3e commit8ff80c1

File tree

1 file changed

+8
-6
lines changed
  • src/backend/storage/buffer

1 file changed

+8
-6
lines changed

‎src/backend/storage/buffer/README

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$PostgreSQL: pgsql/src/backend/storage/buffer/README,v 1.9 2006/03/31 23:32:06 tgl Exp $
1+
$PostgreSQL: pgsql/src/backend/storage/buffer/README,v 1.10 2006/06/08 14:58:33 tgl Exp $
22

33
Notes about shared buffer access rules
44
--------------------------------------
@@ -78,11 +78,7 @@ it won't be able to actually examine the page until it acquires shared
7878
or exclusive content lock.
7979

8080

81-
VACUUM FULL ignores rule #5, because it instead acquires exclusive lock at
82-
the relation level, which ensures indirectly that no one else is accessing
83-
pages of the relation at all.
84-
85-
Plain (concurrent) VACUUM must respect rule #5 fully. Obtaining the
81+
Rule #5 only affects VACUUM operations. Obtaining the
8682
necessary lock is done by the bufmgr routine LockBufferForCleanup().
8783
It first gets an exclusive lock and then checks to see if the shared pin
8884
count is currently 1. If not, it releases the exclusive lock (but not the
@@ -235,3 +231,9 @@ During a checkpoint, the writer's strategy must be to write every dirty
235231
buffer (pinned or not!). We may as well make it start this scan from
236232
NextVictimBuffer, however, so that the first-to-be-written pages are the
237233
ones that backends might otherwise have to write for themselves soon.
234+
235+
The background writer takes shared content lock on a buffer while writing it
236+
out (and anyone else who flushes buffer contents to disk must do so too).
237+
This ensures that the page image transferred to disk is reasonably consistent.
238+
We might miss a hint-bit update or two but that isn't a problem, for the same
239+
reasons mentioned under buffer access rules.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp