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 1tiu42-003bFZ-Kq for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Feb 2025 11:40:59 +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 1tiu40-008F6f-Ni for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Feb 2025 11:40:57 +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 1tiu40-008F6X-8g for pgsql-hackers@lists.postgresql.org; Fri, 14 Feb 2025 11:40:57 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tiu3y-000nEz-1Y for pgsql-hackers@postgresql.org; Fri, 14 Feb 2025 11:40:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1739533253; bh=feFafWhJZUW1mVf0uff3Q+azMhy7EbKcC6EwWPRfFIM=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=KQrqCI0zxin5W1ZPao8etliwq5pz4s3qFfpy1mlrwdItthymUdadZHqONoYUtypvx TFoeLiAf52o3QEeLW102tyU58zCvKZ+TqO7CdVmUkcWgS2OKDhCF0T7ePAfFoin+HV UFvcvEzk3gqeymS79Si1DGh2IRzR8GY5W7eVU11T3G9inwLbu1gdec8bPRARrH9iHE FLOUCOh2+kPLmgW01Al609Kzzv8BT7DgHVXy2InF5re5NhJE383KpXv3laBB2ISZL6 35ZAg+c6nQsHW4tbz1BteGA2kmkeZy1mm6T03icEzKcAqPEX93UqcoZaB8AtnzA4dL X7nD9DaelFF+g== Received: from [172.30.56.6] (unknown [213.171.56.12]) (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) (Client did not present a certificate) (Authenticated sender: a.melnikov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id C668760BA6; Fri, 14 Feb 2025 14:40:52 +0300 (MSK) Message-ID: Date: Fri, 14 Feb 2025 14:40:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Change GUC hashtable to use simplehash? To: John Naylor Cc: Tom Lane , Jeff Davis , Ants Aasma , Heikki Linnakangas , Junwang Zhao , jian he , Andres Freund , Gurjeet Singh , pgsql-hackers@postgresql.org References: <0647027b-9c9a-4f16-8f7c-3f9f3eb9451e@postgrespro.ru> <1520769.1736991361@sss.pgh.pa.us> <16198d33-a4e2-46db-b6c3-494367f5816d@postgrespro.ru> <4c739718-27d6-44fe-9113-56a251c13275@postgrespro.ru> <42304488-65ce-4604-854e-2aaf3bc8f09d@postgrespro.ru> <5ef9fb1c-2e5a-489e-85f5-ba7ac6159577@postgrespro.ru> Content-Language: en-US From: "Anton A. Melnikov" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-KSMG-AntiPhishing: NotDetected, bases: 2025/02/14 10:38:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/02/14 09:20:00 #27221838 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Jhon! On 14.02.2025 08:17, John Naylor wrote: > Hi Anton, could you please test if the attached passes for you? This > seems the simplest way. Yes, of course. I tested this patch on the current master at 9e17ac997 in the same way and found no valgrind errors. Moreover, with -O2 build on my PC the nsphash_lookup() has become fully inlined with this patch and almost two time faster - 112 asm instructions under the same conditions. Thanks! With the best wishes, -- Anton A. Melnikov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company