In 82467f627bd I somehow ended up using 'so->currPos.buf' instead of the 'buf' variable, which is incorrect when the buffer is not already pinned. At the very least this can lead to assertion failures Unfortunately this shows that this code path was not covered. Expand src/test/modules/index/specs/killtuples.spec to test it. Until now the 'result' step always reported either a 0 or 1 buffer accesses, but when exercising hash overflows, more buffers are accessed. To avoid depending on the precise number of accesses, change the result step to return whether there were any heap accesses. That makes the change a lot more verbose, but still seems worth it. Reported-by: Alexander Kuzmenkov <akuzmenkov@tigerdata.com> Reported-by: Alexander Lakhin <exclusion@gmail.com> Reported-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/vjtmvwvbxt7w5uyacxpzibpj65ewcb7uqaqbhd4arvnjbp5jqz%405ksdh6fsyqve Discussion: https://postgr.es/m/b9de8d05-3b02-4a27-9b0b-03972fa4bfd3@iki.fi
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.