7. Tuple Mover
The job of the tuple mover is to move blocks of tuples
in a WS segment to the corresponding RS segment,
updating any join indexes in the process. It operates as a
background task looking for worthy segment pairs. When
it finds one, it performs a merge-out process, MOP on this
(RS, WS) segment pair.
MOP will find all records in the chosen WS segment
with an insertion time at or before the LWM, and then
divides them into two groups:
· Ones deleted at or before LWM. These are discarded,
because the user cannot run queries as of a time when
they existed.
· Ones that were not deleted, or deleted after LWM.
These are moved to RS.
MOP will create a new RS segment that we name RS'.
Then, it reads in blocks from columns of the RS segment,
deletes any RS items with a value in the DRV less than or
equal to the LWM, and merges in column values from
WS. The merged data is then written out to the new RS'
segment, which grows as the merge progresses. The most
recent insertion time of a record in RS’ becomes the
segment’s new tlastmove and is always less than or equal to
the LWM. This old-master/new-master approach will be
more efficient than an update-in-place strategy, since
essentially all data objects will move. Also, notice that
records receive new storage keys in RS', thereby requiring
join index maintenance. Since RS items may also be