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.94.2) (envelope-from ) id 1t7zdK-001OXk-Kd for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2024 16:08:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t7zdI-002oPY-2N for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2024 16:08:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t7zdH-002oPQ-PI for pgsql-hackers@lists.postgresql.org; Mon, 04 Nov 2024 16:08:48 +0000 Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t7zdE-000AKg-O6 for pgsql-hackers@postgresql.org; Mon, 04 Nov 2024 16:08:47 +0000 Received: from [192.168.1.150] (dsl-hkibng22-50ddb7-241.dhcp.inet.fi [80.221.183.241]) (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 4XhxGg42h8zyPV; Mon, 4 Nov 2024 18:08:43 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1730736523; 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=HJejoVLx4u9hEET2aSY8PGIJS6LRwkCXkvpJkH061MA=; b=oZXQQaqmR5/UwacVOa0UN/3aBKtbtj9Beny0/tYqBE1AOY35yowrnImQEfQm4F89EZJkym UimiuCfegnZeNQZ0WUfDXcZZUw72k2AxjfpcogOvRIe12qF9ruEwGozu4mpPoSynrkJNFn 5vNOBwswuhtkbxQ9Ai2JwiwurgIweOc= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1730736523; a=rsa-sha256; cv=none; b=U74M/irXehSB616pWta0/7l97HczLrpQQXYiaNmStdUdI8lDr9OZnWFW4rpmRMtV/D4QHD ZFgWXR7XvqSOP+K6ea86GDBUagt27lWg+tIKzmaIWjQ6s9fPCwdDfeiDIPEghFqSLqehF9 HZBbNN6y227TgxMz7LiHz3MS34oEfns= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1730736523; 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=HJejoVLx4u9hEET2aSY8PGIJS6LRwkCXkvpJkH061MA=; b=OGpg41x3DWIP6DwBULtFYPyS3OUUXUA4hr9wNY8hBVbJFJ0DjW1dskxMUpoJClcEmHlTT2 hpvKrhsiIgBVO+ebhwx7Jw8ERa11RhnrREWX1tlBXCQ7f5jIDUApRQcIxRe0XT4Iy6clfN aup+jN8k9uM7rx07F1yZNK3Jtn8sOdo= Message-ID: Date: Mon, 4 Nov 2024 18:08:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Latches vs lwlock contention To: Maxim Orlov Cc: Thomas Munro , pgsql-hackers , Yura Sokolov , Andres Freund References: <53c844e1-a21a-e481-cca5-2184c8aa47b9@iki.fi> <7c2090cd-a72a-4e34-afaa-6dd2ef31440e@iki.fi> 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 10/09/2024 19:53, Maxim Orlov wrote: > I looked at the patch set and found it quite useful. > > The first 7 patches are just refactoring and may be committed separately > if needed. > There were minor problems: patch #5 don't want to apply clearly and the > #8 is complained > about partitionLock is unused if we build without asserts. So, I add a > PG_USED_FOR_ASSERTS_ONLY > to solve the last issue. > > Again, overall patch looks good and seems useful to me. Here is the > rebased v5 version based on Heikki's patch set above. Committed, thanks for the review! In case you're wondering, I committed some of the smaller patches separately, but also squashed some of them with the main patch, On closer look, the first patch, "Remove LOCK_PRINT() call that could point to garbage", wasn't fixing any existing issue. The LOCK_PRINT() was fine, because we held the partition lock. But it became necessary with the main patch, so I squashed it with that. And the others that I squashed were just not that interesting on their own. The rest of Thomas's SetLatches work remains, so I left the commitfest entry in "Needs review" state. -- Heikki Linnakangas Neon (https://neon.tech)