Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wA7Zq-0025Ed-0y for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 14:38:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wA7Zo-000qk2-2b for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 14:38:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wA7Zo-000qjq-1O for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 14:38:48 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wA7Zm-00000001370-18QJ for pgsql-hackers@postgresql.org; Tue, 07 Apr 2026 14:38:48 +0000 Received: from [10.0.2.15] (unknown [130.41.208.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4fqpjG6lX9zyS1; Tue, 07 Apr 2026 17:38:42 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1775572723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kNx03OG2t6UwG6TdI/bCPVhyiq/HiviyjzmKaczQSgw=; b=Qmovw85dUTKiyWnedcsYpz0tkrF4CAPVG5PwLpfx8LMoK3lgOXBSmULmEPkMKXdb2XRnqv Z4u06Oi8rqPZbGhuo53TsFof9+HVEBDQ0YErxEZL6ou6xg0oTSCx/q/fVsqM6+u3E1X+RB j6B+oCBlUnKfu713swXKHiF3U+pB77E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1775572723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kNx03OG2t6UwG6TdI/bCPVhyiq/HiviyjzmKaczQSgw=; b=iSoB1hOYnEqKvbJFJF3F+yalD3eg6MhJoWlKD88WJgWjMYVbXRiXF9NfxDoVfQaTfYuFyj kxzK9NXvRVCpb4mBTqnssxpt7kjjKWRzt3qOyg7pX9OUlWoNwSbvT2ijML/OF7ZsvrNHjP mzf1cH+IQEtWU0hM23HEfoAtwcA9+6I= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; a=rsa-sha256; d=iki.fi; s=meesny; cv=none; t=1775572723; b=JVS0OWCRu0FUsoq3r2hEv4Zby833pnGCDBkdwhf/JAXlcPrjaSORT32w/6Wyi6vflqB1ES k6sdWk0m3tNdymMkXi9HVJwbqJLqR3mIAkybpchok7kSBAF1kbX1wpye02jKDr//MvPLZ5 07iWLxIIEF/So9Yx0ftgZ468uofF4W4= Message-ID: <66439a51-0ff9-4897-b4e5-b6308693bb7f@iki.fi> Date: Tue, 7 Apr 2026 17:38:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Assertion failure in hash_kill_items() To: Andres Freund Cc: "pgsql-hackers@postgresql.org" , Alexander Kuzmenkov , Ashutosh Sharma References: Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 17/03/2026 19:40, Andres Freund wrote: > On 2026-03-17 19:15:10 +0200, Heikki Linnakangas wrote: >> The second patch simplifies the condition in the 'unlock_page' part. This >> isn't new, and isn't needed to fix the bug, it just caught my eye while >> looking at this. I don't understand why the condition was the way it was, >> checking just 'havePin' seems sufficient and more correct to me. Am I >> missing something? > > I can't see anything either, quite odd. Most likely explanation seems to be > that something changed during the development of 7c75ef571579. > > > Indeed, the first version of the patch from > https://postgr.es/m/CAE9k0Pm3KTx93K8_5j6VMzG4h5F%2BSyknxUwXrN-zqSZ9X8ZS3w%40mail.gmail.com > was using "if (so->hashso_bucket_buf == so->currPos.buf)" both at the start > and end of _hash_kill_items(). So likely it was just an accident during patch > revisions. Thanks for archeological excavation; pushed this second patch now. - Heikki