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
e37360d5
Commit
e37360d5
authored
Jan 18, 2017
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve comment in hashsearch.c.
Typo fix from Mithun Cy; other improvements by me.
parent
1586317c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashsearch.c
+11
-10
No files found.
src/backend/access/hash/hashsearch.c
View file @
e37360d5
...
@@ -334,19 +334,20 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -334,19 +334,20 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
so
->
hashso_bucket_buf
=
buf
;
so
->
hashso_bucket_buf
=
buf
;
/*
/*
* If
the bucket split is in progress, then while scanning the bucket
* If
a bucket split is in progress, then while scanning the bucket being
*
being populated, we need to skip tuples that are moved from bucket
*
populated, we need to skip tuples that were copied from bucket being
*
being split. We need to maintain the pin on
bucket being split to
*
split. We also need to maintain a pin on the
bucket being split to
* ensure that split-cleanup work done by vacuum doesn't remove tuples
* ensure that split-cleanup work done by vacuum doesn't remove tuples
* from it till this scan is done. We need to main
to maintain the pin on
* from it till this scan is done. We need to main
tain a pin on the
* bucket being populated to ensure that vacuum doesn't squeeze that
* bucket being populated to ensure that vacuum doesn't squeeze that
* bucket till this scan is complete
, otherwise
the ordering of tuples
* bucket till this scan is complete
; otherwise,
the ordering of tuples
* can't be maintained during forward and backward scans. Here, we have
* can't be maintained during forward and backward scans. Here, we have
* to be cautious about locking order, first acquire the lock on bucket
* to be cautious about locking order: first, acquire the lock on bucket
* being split, release the lock on it, but not pin, then acquire the lock
* being split; then, release the lock on it but not the pin; then,
* on bucket being populated and again re-verify whether the bucket split
* acquire a lock on bucket being populated and again re-verify whether
* still is in progress. First acquiring lock on bucket being split
* the bucket split is still in progress. Acquiring the lock on bucket
* ensures that the vacuum waits for this scan to finish.
* being split first ensures that the vacuum waits for this scan to
* finish.
*/
*/
if
(
H_BUCKET_BEING_POPULATED
(
opaque
))
if
(
H_BUCKET_BEING_POPULATED
(
opaque
))
{
{
...
...
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