pgsql: Add non-MVCC index scan test module.
Add non-MVCC index scan test module.
Add test_indexscan, a new test module that provides an SQL-callable
function that performs a full index scan using whatever snapshot type
the caller asks for. Also add a set of tests that verify and document a
variety of behaviors associated with some specific snapshot type.
Preparation for an upcoming commit that will move index scan heap
fetches behind a new slot-based table AM interface. Aside from testing
non-MVCC snapshot types, these new tests can catch bugs where an index
scan incorrectly maintains xs_heap_continue during HOT chain traversal.
Such bugs are unlikely to affect MVCC scans, which makes it hard to
write tests that detect them without relying on a custom test module.
Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: /messages/by-id/CAH2-Wzn+C=mAMv9aW3Skfh80JPpHKT3yM=DYwkrrhYyG2f+_vg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f7a563ccd1233f99b3b202c6c208ee37694c8cef
Modified Files
--------------
src/test/modules/index/Makefile | 10 ++
src/test/modules/index/expected/hot_chain.out | 91 ++++++++++++++++
src/test/modules/index/meson.build | 26 +++++
src/test/modules/index/sql/hot_chain.sql | 47 ++++++++
src/test/modules/index/test_indexscan--1.0.sql | 13 +++
src/test/modules/index/test_indexscan.c | 143 +++++++++++++++++++++++++
src/test/modules/index/test_indexscan.control | 4 +
7 files changed, 334 insertions(+)