Buffer pin leak in hash index bucket splits - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Buffer pin leak in hash index bucket splits
Date
Msg-id CAH2-Wz=b9sSBv15HsgZAuazjJu8-YRGHOpLjvp+dJgEDaBx0Ng@mail.gmail.com
Whole thread
Responses Re: Buffer pin leak in hash index bucket splits
List pgsql-hackers
During review of what became bugfix commit 173cf85a, Claude Code found
an unrelated bug in hash index bucket splits.

Attached bug fix patch adds an isolation test demonstrating the
problem; with the fix itself reverted, running the Claude-authored
test shows a buffer pin leak. The leak is caused by _hash_finish_split
neglecting to release a pin on the primary bucket buffer in its
failure paths, used when a cleanup lock cannot be acquired. The fix
just has _hash_finish_split release the pin in those paths.

I doubt that it's worth committing the test itself. It'll add test
cycles for a trivial issue, that's unlikely to ever regress in the
future.

-- 
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: kedar anavardekar
Date:
Subject: Re: Fix WITHOUT OVERLAPS multirange with location replication
Next
From: Amit Kapila
Date:
Subject: Re: Fix WITHOUT OVERLAPS multirange with location replication