Both scanning the index and inserting tuples require locating the bucket
where a given tuple ought to be located. To do this, we need the bucket
count, highmask, and lowmask from the metapage; however, it's undesirable
- for performance reasons to have to have to lock and pin the metapage for
- every such operation. Instead, we retain a cached copy of the metapage
- in each backend's relcache entry. This will produce the correct bucket
- mapping as long as the target bucket hasn't been split since the last
- cache refresh.
+ for performance reasons to have to lock and pin the metapage for every such
+ operation. Instead, we retain a cached copy of the metapage in each
+ backend's relcache entry. This will produce the correct bucket mapping as
+ long as the target bucket hasn't been split since the last cache refresh.
</para>
<para>
Both scanning the index and inserting tuples require locating the bucket
where a given tuple ought to be located. To do this, we need the bucket
count, highmask, and lowmask from the metapage; however, it's undesirable
-for performance reasons to have to have to lock and pin the metapage for
-every such operation. Instead, we retain a cached copy of the metapage
-in each backend's relcache entry. This will produce the correct
-bucket mapping as long as the target bucket hasn't been split since the
-last cache refresh.
+for performance reasons to have to lock and pin the metapage for every such
+operation. Instead, we retain a cached copy of the metapage in each backend's
+relcache entry. This will produce the correct bucket mapping as long as the
+target bucket hasn't been split since the last cache refresh.
To guard against the possibility that such a split has occurred, the
primary page of each bucket chain stores the number of buckets that