Thread: pgsql: Improve contrib/bloom regression test using code coverage info.

pgsql: Improve contrib/bloom regression test using code coverage info.

From
Tom Lane
Date:
Improve contrib/bloom regression test using code coverage info.

Originally, this test created a 100000-row test table, which made it
run rather slowly compared to other contrib tests.  Investigation with
gcov showed that we got no further improvement in code coverage after
the first 700 or so rows, making the large table 99% a waste of time.
Cut it back to 2000 rows to fix the runtime problem and still leave
some headroom for testing behaviors that may appear later.

A closer look at the gcov results showed that the main coverage
omissions in contrib/bloom occurred because the test never filled more
than one entry in the notFullPage array; which is unsurprising because
it exercised index cleanup only in the scenario of complete table
deletion, allowing every page in the index to become deleted rather
than not-full.  Add testing that allows the not-full path to be
exercised as well.

Also, test the amvalidate function, because blvalidate.c had zero
coverage without that, and besides it's a good idea to check for
mistakes in the bloom opclass definitions.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cf223c3bf5ba16232147c66b5fef4037aafe747c

Modified Files
--------------
contrib/bloom/expected/bloom.out | 60 ++++++++++++++++++++++++++++++----------
contrib/bloom/sql/bloom.sql      | 18 ++++++++++--
2 files changed, 62 insertions(+), 16 deletions(-)