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 1tYEpr-006UfF-HH for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jan 2025 01:38:15 +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 1tYEpp-003DBe-8d for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jan 2025 01:38:13 +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.94.2) (envelope-from ) id 1tYEpo-003DBR-U1 for pgsql-hackers@lists.postgresql.org; Thu, 16 Jan 2025 01:38:13 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYEpo-000cvs-0k for pgsql-hackers@postgresql.org; Thu, 16 Jan 2025 01:38:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 50G1a1KH1520770; Wed, 15 Jan 2025 20:36:01 -0500 From: Tom Lane To: "Anton A. Melnikov" cc: John Naylor , Jeff Davis , Ants Aasma , Heikki Linnakangas , Junwang Zhao , jian he , Andres Freund , Gurjeet Singh , pgsql-hackers@postgresql.org Subject: Re: Change GUC hashtable to use simplehash? In-reply-to: <0647027b-9c9a-4f16-8f7c-3f9f3eb9451e@postgrespro.ru> References: <09924cd6c49935d5e9bba5cd40bec28c605d7c2e.camel@j-davis.com> <48e8f8bbe0be9c789f98776c7438244ab7a7cc63.camel@j-davis.com> <458350a908d9607f7fc2a15407f4405cc454c970.camel@j-davis.com> <2b0df3af97fac73a40aba16a58837e2cee594b1f.camel@j-davis.com> <0647027b-9c9a-4f16-8f7c-3f9f3eb9451e@postgrespro.ru> Comments: In-reply-to "Anton A. Melnikov" message dated "Thu, 16 Jan 2025 04:15:31 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1520768.1736991361.1@sss.pgh.pa.us> Date: Wed, 15 Jan 2025 20:36:01 -0500 Message-ID: <1520769.1736991361@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Anton A. Melnikov" writes: > Seems it is possible to exclude much less code from checking > under valgrind and get the same result by replacing the only > function call pg_rightmost_one_pos64() with a valgrind-safe > code. See the attached patch, please. There is no place anywhere in our code base where we hide unsafe code from valgrind rather than fixing said code. This does not seem like a place to start such an ugly practice. Performance does not trump everything else. I'd be inclined to just remove the pg_rightmost_one_pos64 call in favor of the other coding you suggest. regards, tom lane