Add test for single-page VACUUM of hash index on INSERT

_hash_vacuum_one_page() in hashinsert.c is a routine related to hash
indexes that can perform a single-page VACUUM when dead tuples are
detected during index insertion.  This routine previously had no test
coverage, and this commit adds a test case for that purpose.

To safely create dead tuples in a way that works with parallel tests,
this uses a technique based on a rollbacked INSERT, following a
suggestion by Heikki Linnakangas.

Author: Alexander Kuzmenkov <[email protected]>
Reviewed-by: Heikki Linnakangas <[email protected]>
Discussion: 
https://postgr.es/m/calzhyqxrc1zhymf5v8ne+ymboqvg7xzrqm7k2c7vs0p1v8z...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f7947a48d0c4b802f986ac32dc0e95b6f7f8f8f

Modified Files
--------------
src/test/regress/expected/hash_index.out | 21 +++++++++++++++++++++
src/test/regress/sql/hash_index.sql      | 17 +++++++++++++++++
2 files changed, 38 insertions(+)

Reply via email to