pgsql: Add test for single-page VACUUM of hash index on INSERT - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Add test for single-page VACUUM of hash index on INSERT
Date
Msg-id E1w4CGe-000tmx-0t@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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 <akuzmenkov@tigerdata.com>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/CALzhyqxrc1ZHYmf5V8NE+yMboqVg7xZrQM7K2c7VS0p1v8z42w@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(+)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Move declarations related to locktags from lock.h to new locktag
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Don't reset 'latest_page_number' when replaying multixid truncat