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 1sjKZM-00HMhQ-IN for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 15:26:48 +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 1sjKZK-006jKH-5F for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 15:26:46 +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 1sjKZJ-006jK9-Rl for pgsql-hackers@lists.postgresql.org; Wed, 28 Aug 2024 15:26:46 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sjKZG-001wFc-Vs for pgsql-hackers@postgresql.org; Wed, 28 Aug 2024 15:26:45 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 59FD8954F0 for ; Wed, 28 Aug 2024 17:26:41 +0200 (CEST) Received: from s899.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 4447B9586A; Wed, 28 Aug 2024 17:26:41 +0200 (CEST) Received: from s470.loopia.se (unknown [172.22.191.6]) by s899.loopia.se (Postfix) with ESMTP id 42AC82C8BAAB; Wed, 28 Aug 2024 17:26:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s470.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=proxel.se Received: from s934.loopia.se ([172.22.191.5]) by s470.loopia.se (s470.loopia.se [172.22.190.34]) (amavisd-new, port 10024) with UTF8LMTP id tgHwdwOJDlzs; Wed, 28 Aug 2024 17:26:40 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: andreas@proxel.se X-Loopia-Originating-IP: 158.174.129.34 Received: from [192.168.0.189] (h-158-174-129-34.NA.cust.bahnhof.se [158.174.129.34]) (Authenticated sender: andreas@proxel.se) by s934.loopia.se (Postfix) with ESMTPSA id 9C2257CEA4B; Wed, 28 Aug 2024 17:26:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxel.se; s=loopiadkim1707418970; t=1724858800; bh=oQvd/XNS0b0Wodb+EWZC3j4i9/eLvszoYlcmBRAngEQ=; h=Date:Subject:To:References:From:In-Reply-To; b=OSGezO0vF57QVDyObAltWvt3nn5+SjCCaW5zCXD7wpajmo0JSJzUkRciLRMdb76Z8 S2fFQml4jZ4vAVfFjq0BfkhK5MZkYGH8/Ls2JwLnV0L/sToUtjIIPF0kdHkjy9lPgN j/Ur0qy7U8rXuoRR9zOdOlcFF6pJW/Is71P06TKTxaTZdxkP3tWNgnW+g44nF++JX6 V2SnlRD/yn27vhb5p4tScWIoUQkX36jUCR/Phz0Eps4ICp43M7rE6VofqI3GXOpE9p rgVsgjpenjA7vUTF13lSiwRFKq0KZz9Pe3JgET6J8hUrRrzjiw7ICM5lN6U0PQdWar HSEhM/+K7RiyQ== Message-ID: <93804d18-9e49-46b6-abc8-de9694f34d0a@proxel.se> Date: Wed, 28 Aug 2024 17:26:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Little cleanup of ShmemInit function names To: Heikki Linnakangas , "pgsql-hackers@postgresql.org" References: Content-Language: en-US From: Andreas Karlsson 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 8/7/24 2:08 PM, Heikki Linnakangas wrote: > The attached patches rename them to follow the usual naming convention. > The InitLocks() function is refactored a bit more, splitting the > per-backend initialization to a separate InitLockManagerAccess() > function. That's why it's in a separate commit. I like the idea behind the patches. And they still apply and build. The first patch is clean and well commented. I just have two minor nitpicks. Small typo with the extra "which" which makes the sentence not flow correctly "This is called from CreateSharedMemoryAndSemaphores(), which see for more comments." On the topic of minor language issues I think the comma below is redundant. "In the normal postmaster case, the shared hash tables are created here." The second patch is a simple renaming which reduces mental load by making the naming more consistent so I like it. Also since these functions are not really useful for any extension authors I do not see any harm in renaming them. After cleaning up the language of that comment I think these patches can be committed. Andreas