pgsql: Fix harmless leftover in _hash_kill_items()

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix harmless leftover in _hash_kill_items()
Date: 2026-04-07 14:38:31
Message-ID: E1wA7ZX-003PVQ-0I@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix harmless leftover in _hash_kill_items()

Checking for 'havePin' is sufficient here. An earlier version of the
patch didn't have the 'havePin' variable and used
'so->hashso_bucket_buf == so->currPos.buf' as the condition when both
locking and unlocking the page. The havePin variable was added later
during development, but the unlocking condition wasn't fully
updated. Tidy it up.

Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://www.postgresql.org/message-id/b9de8d05-3b02-4a27-9b0b-03972fa4bfd3@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/979387f1885111c72b84af535f23de4e3e913206

Modified Files
--------------
src/backend/access/hash/hashutil.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-04-07 14:58:53 pgsql: Reserve replication slots specifically for REPACK
Previous Message Andrew Dunstan 2026-04-07 14:35:18 pgsql: Add errdetail() with PID and UID about source of termination sig