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

Commite37360d

Browse files
committed
Improve comment in hashsearch.c.
Typo fix from Mithun Cy; other improvements by me.
1 parent1586317 commite37360d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

‎src/backend/access/hash/hashsearch.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,20 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
334334
so->hashso_bucket_buf=buf;
335335

336336
/*
337-
* Ifthe bucket split is in progress, then while scanning the bucket
338-
*beingpopulated, we need to skip tuples thatare moved from bucket
339-
*beingsplit. We need to maintainthe pin on bucket being split to
337+
* Ifa bucket split is in progress, then while scanning the bucket being
338+
* populated, we need to skip tuples thatwere copied from bucket being
339+
* split. Wealsoneed to maintaina pin on the bucket being split to
340340
* ensure that split-cleanup work done by vacuum doesn't remove tuples
341-
* from it till this scan is done. We need tomain tomaintainthe pin on
341+
* from it till this scan is done. We need to maintaina pin on the
342342
* bucket being populated to ensure that vacuum doesn't squeeze that
343-
* bucket till this scan is complete, otherwise the ordering of tuples
343+
* bucket till this scan is complete; otherwise, the ordering of tuples
344344
* can't be maintained during forward and backward scans. Here, we have
345-
* to be cautious about locking order, first acquire the lock on bucket
346-
* being split, release the lock on it, but not pin, then acquire the lock
347-
* on bucket being populated and again re-verify whether the bucket split
348-
* still is in progress. First acquiring lock on bucket being split
349-
* ensures that the vacuum waits for this scan to finish.
345+
* to be cautious about locking order: first, acquire the lock on bucket
346+
* being split; then, release the lock on it but not the pin; then,
347+
* acquire a lock on bucket being populated and again re-verify whether
348+
* the bucket split is still in progress. Acquiring the lock on bucket
349+
* being split first ensures that the vacuum waits for this scan to
350+
* finish.
350351
*/
351352
if (H_BUCKET_BEING_POPULATED(opaque))
352353
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp