File tree 2 files changed +21
-6
lines changed
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,21 @@ BEGIN
284
284
INSERT INTO dedup_unique_test_table SELECT 1;
285
285
END LOOP;
286
286
END$$;
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;
287
294
--
288
295
-- Test B-tree fast path (cache rightmost leaf page) optimization.
289
296
--
290
297
-- First create a tree that's at least three levels deep (i.e. has one level
291
298
-- 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.)
295
302
--
296
303
-- The text column must be the leading column in the index, since suffix
297
304
-- 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
123
123
END LOOP;
124
124
END$$;
125
125
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
+
126
134
--
127
135
-- Test B-tree fast path (cache rightmost leaf page) optimization.
128
136
--
129
137
130
138
-- First create a tree that's at least three levels deep (i.e. has one level
131
139
-- 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.)
135
143
--
136
144
-- The text column must be the leading column in the index, since suffix
137
145
-- truncation would otherwise truncate tuples on internal pages, leaving us
You can’t perform that action at this time.
0 commit comments