File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,21 @@ BEGIN
284284 INSERT INTO dedup_unique_test_table SELECT 1;
285285 END LOOP;
286286END$$;
287+ -- Exercise the LP_DEAD-bit-set tuple deletion code with a posting list tuple.
288+ -- The implementation prefers deleting existing items to merging any duplicate
289+ -- tuples into a posting list, so we need an explicit test to make sure we get
290+ -- coverage (note that this test also assumes BLCKSZ is 8192 or less):
291+ DROP INDEX plain_unique;
292+ DELETE FROM dedup_unique_test_table WHERE a = 1;
293+ INSERT INTO dedup_unique_test_table SELECT i FROM generate_series(0,450) i;
287294--
288295-- Test B-tree fast path (cache rightmost leaf page) optimization.
289296--
290297-- First create a tree that's at least three levels deep (i.e. has one level
291298-- between the root and leaf levels). The text inserted is long. It won't be
292- -- compressed because we use plain storage in the table. Only a few index
293- -- tuples fit on each internal page, allowing us to get a tall tree with few
294- -- pages. (A tall tree is required to trigger caching.)
299+ -- TOAST compressed because we use plain storage in the table. Only a few
300+ -- index tuples fit on each internal page, allowing us to get a tall tree with
301+ -- few pages. (A tall tree is required to trigger caching.)
295302--
296303-- The text column must be the leading column in the index, since suffix
297304-- truncation would otherwise truncate tuples on internal pages, leaving us
Original file line number Diff line number Diff line change @@ -123,15 +123,23 @@ BEGIN
123123 END LOOP;
124124END$$;
125125
126+ -- Exercise the LP_DEAD-bit-set tuple deletion code with a posting list tuple.
127+ -- The implementation prefers deleting existing items to merging any duplicate
128+ -- tuples into a posting list, so we need an explicit test to make sure we get
129+ -- coverage (note that this test also assumes BLCKSZ is 8192 or less):
130+ DROP INDEX plain_unique;
131+ DELETE FROM dedup_unique_test_table WHERE a = 1 ;
132+ INSERT INTO dedup_unique_test_table SELECT i FROM generate_series(0 ,450 ) i;
133+
126134--
127135-- Test B-tree fast path (cache rightmost leaf page) optimization.
128136--
129137
130138-- First create a tree that's at least three levels deep (i.e. has one level
131139-- between the root and leaf levels). The text inserted is long. It won't be
132- -- compressed because we use plain storage in the table. Only a few index
133- -- tuples fit on each internal page, allowing us to get a tall tree with few
134- -- pages. (A tall tree is required to trigger caching.)
140+ -- TOAST compressed because we use plain storage in the table. Only a few
141+ -- index tuples fit on each internal page, allowing us to get a tall tree with
142+ -- few pages. (A tall tree is required to trigger caching.)
135143--
136144-- The text column must be the leading column in the index, since suffix
137145-- truncation would otherwise truncate tuples on internal pages, leaving us
You can’t perform that action at this time.
0 commit comments