Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
876f78d5
Commit
876f78d5
authored
Feb 17, 2014
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix capitalization in README.
Vik Fearing
parent
e7f40975
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/backend/storage/buffer/README
src/backend/storage/buffer/README
+7
-7
No files found.
src/backend/storage/buffer/README
View file @
876f78d5
...
@@ -176,8 +176,8 @@ small limit value) whenever the buffer is pinned. (This requires only the
...
@@ -176,8 +176,8 @@ small limit value) whenever the buffer is pinned. (This requires only the
buffer header spinlock, which would have to be taken anyway to increment the
buffer header spinlock, which would have to be taken anyway to increment the
buffer reference count, so it's nearly free.)
buffer reference count, so it's nearly free.)
The "clock hand" is a buffer index,
N
extVictimBuffer, that moves circularly
The "clock hand" is a buffer index,
n
extVictimBuffer, that moves circularly
through all the available buffers.
N
extVictimBuffer is protected by the
through all the available buffers.
n
extVictimBuffer is protected by the
BufFreelistLock.
BufFreelistLock.
The algorithm for a process that needs to obtain a victim buffer is:
The algorithm for a process that needs to obtain a victim buffer is:
...
@@ -189,8 +189,8 @@ is pinned or has a nonzero usage count, it cannot be used; ignore it and
...
@@ -189,8 +189,8 @@ is pinned or has a nonzero usage count, it cannot be used; ignore it and
return to the start of step 2. Otherwise, pin the buffer, release
return to the start of step 2. Otherwise, pin the buffer, release
BufFreelistLock, and return the buffer.
BufFreelistLock, and return the buffer.
3. Otherwise, select the buffer pointed to by
N
extVictimBuffer, and
3. Otherwise, select the buffer pointed to by
n
extVictimBuffer, and
circularly advance
N
extVictimBuffer for next time.
circularly advance
n
extVictimBuffer for next time.
4. If the selected buffer is pinned or has a nonzero usage count, it cannot
4. If the selected buffer is pinned or has a nonzero usage count, it cannot
be used. Decrement its usage count (if nonzero) and return to step 3 to
be used. Decrement its usage count (if nonzero) and return to step 3 to
...
@@ -254,11 +254,11 @@ Background Writer's Processing
...
@@ -254,11 +254,11 @@ Background Writer's Processing
The background writer is designed to write out pages that are likely to be
The background writer is designed to write out pages that are likely to be
recycled soon, thereby offloading the writing work from active backends.
recycled soon, thereby offloading the writing work from active backends.
To do this, it scans forward circularly from the current position of
To do this, it scans forward circularly from the current position of
N
extVictimBuffer (which it does not change!), looking for buffers that are
n
extVictimBuffer (which it does not change!), looking for buffers that are
dirty and not pinned nor marked with a positive usage count. It pins,
dirty and not pinned nor marked with a positive usage count. It pins,
writes, and releases any such buffer.
writes, and releases any such buffer.
If we can assume that reading
N
extVictimBuffer is an atomic action, then
If we can assume that reading
n
extVictimBuffer is an atomic action, then
the writer doesn't even need to take the BufFreelistLock in order to look
the writer doesn't even need to take the BufFreelistLock in order to look
for buffers to write; it needs only to spinlock each buffer header for long
for buffers to write; it needs only to spinlock each buffer header for long
enough to check the dirtybit. Even without that assumption, the writer
enough to check the dirtybit. Even without that assumption, the writer
...
@@ -268,7 +268,7 @@ the contention cost of the writer compared to PG 8.0.)
...
@@ -268,7 +268,7 @@ the contention cost of the writer compared to PG 8.0.)
During a checkpoint, the writer's strategy must be to write every dirty
During a checkpoint, the writer's strategy must be to write every dirty
buffer (pinned or not!). We may as well make it start this scan from
buffer (pinned or not!). We may as well make it start this scan from
N
extVictimBuffer, however, so that the first-to-be-written pages are the
n
extVictimBuffer, however, so that the first-to-be-written pages are the
ones that backends might otherwise have to write for themselves soon.
ones that backends might otherwise have to write for themselves soon.
The background writer takes shared content lock on a buffer while writing it
The background writer takes shared content lock on a buffer while writing it
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment