I am attaching the patch to improve some coverage of hash index code [1]. I have added some basic tests, which mainly covers overflow pages. It took 2 sec extra time in my machine in parallel schedule.
Hit
Total
Coverage
old tests
Line Coverage
780
1478
52.7
Function Coverage
63
85
74.1
improvement after tests
Line Coverage
1181
1478
79.9 %
Function Coverage
78
85
91.8 %
I think the code coverage improvement for hash index with these tests seems to be quite good, however time for tests seems to be slightly on higher side. Do anybody have better suggestion for these tests?
I wonder why you have included a new file for these tests, why can't be these added to existing hash_index.sql.
+-- +-- Cause some overflow insert and splits. +-- +CREATE TABLE con_hash_index_table (keycol INT); +CREATE INDEX con_hash_index on con_hash_index_table USING HASH (keycol);
The relation name con_hash_index* choosen in above tests doesn't seem to be appropriate, how about hash_split_heap* or something like that.