forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aoblkdir: remove hole filling mechanism
Background: (1) Block directory rowcount hole filling: The firstRowNum is allocated on the basis of gp_fast_sequence and is not always contiguous with the last minipage entry's (firstRowNum + rowCount) value. Before we insert the next minipage entry, we "fill" the rowCount of the previous one so that the range appears contiguous between successive minipage entries. (2) Hole filling in action: insert into foo values(1); -> inserts entry A with (firstRowNum, rowCount) = (1, 1) insert into foo values(1); -> updates previous entry A to (firstRowNum, rowCount) = (1, 100) since firstRowNum = 101 for the next insert, we fill the previous entry to ensure that there are no holes in the rowCount range. Motivation: There is no apparent reason why this mechanism is necessary and it becomes a hindrance for future work to support unique indexes. That work depends on the continuity of a block directory entry's range to determine unique index lookups. Changes: (1) Removing this mechanism establishes the invariant: fetching physical rows in the continuous range of a block directory entry's first and last rownumbers will always be successful. (2) We enforce this invariant with suitable ERRORs inside the fetch machinery. However, since hole filling will still exist in older versions, we do a AORelationVersion bump and ERROR out only for the current version and onwards. Note: We use the formatversion attribute of ao(cs)seg rels instead of the unused Minipage->version member. This is because even though it makes more semantic sense and constitutes an equivalent condition for the ERROR, it means more work for banning code in unique index creation: If we were to use Minipage->version, we would have to check every minipage in the block directory, which might be more expensive than the limited number of ao(cs)seg tuples we would have to check on the other hand. Co-authored-by: Ashwin Agrawal <aashwin@vmware.com>
- Loading branch information
1 parent
ec10c4d
commit 258ec96
Showing
18 changed files
with
1,208 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.