Re: Assertion failure in hash_kill_items()

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Alexander Kuzmenkov <akuzmenkov@tigerdata.com>, Ashutosh Sharma <ashu.coek88@gmail.com>
Date: 2026-03-17T20:50:54Z
Lists: pgsql-hackers
Hi,

On 2026-03-17 13:40:10 -0400, Andres Freund wrote:
> On 2026-03-17 19:15:10 +0200, Heikki Linnakangas wrote:
> > I bumped into an assertion failure, while playing with variants of the test
> > case that Alexander Kuzmenkov wrote to exercise hash index page cleanup [1].
> > This is master-only, related to the recent changes in how buffers are marked
> > dirty.
> 
> Sorry, I had hoped to push a fix for that already, after it was reported in
>   https://postgr.es/m/vjtmvwvbxt7w5uyacxpzibpj65ewcb7uqaqbhd4arvnjbp5jqz%405ksdh6fsyqve
> but real life intervened.
> 
> I was planning to commit it together with an addition to
>   src/test/modules/index/specs/killtuples.spec
> 
> Unfortunately that made the change a good bit more verbose, as a naive
> addition would report a number of buffer accesses that seemed not necessarily
> reliable to me.   So I updated the 'result' step to just return true/false
> depending on whether there were any accesses.
> 
> I'll go and work on pushing that.

Done, as of f5eb854ab6d.

Greetings,

Andres



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix harmless leftover in _hash_kill_items()

  2. Fix use of wrong variable in _hash_kill_items()