Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4R7E-0006ci-AC for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 17:27:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4R7D-00077A-5c for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 17:27:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4R7C-000771-Sk for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 17:27:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4R7A-0004vh-SG for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 17:27:22 +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 203HRIFX3597998; Mon, 3 Jan 2022 12:27:18 -0500 From: Tom Lane To: Michael Paquier cc: Julien Rouhaud , pgsql-hackers@lists.postgresql.org Subject: Re: Use MaxLockMode in lock methods initialization In-reply-to: References: <20220103064722.ewdv4evlez5m7mdn@jrouhaud> Comments: In-reply-to Michael Paquier message dated "Mon, 03 Jan 2022 17:00:13 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3597996.1641230838.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 03 Jan 2022 12:27:18 -0500 Message-ID: <3597997.1641230838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Mon, Jan 03, 2022 at 02:47:22PM +0800, Julien Rouhaud wrote: >> While reading some code around I noticed that b04aeb0a053e7 added a Max= LockMode >> but didn't update the lock methods initialization. It shouldn't make m= uch >> difference in the long run but some consistency seems better to me. > Makes sense to me. MaxLockMode is here for the same purpose as this > initialization area. Agreed. That aspect of b04aeb0a053e7 was a bit of a quick hack, and it didn't occur to me to look for other places where the symbol could be used. But these two places are spot-on for it. Pushed with a bit of comment-fiddling. regards, tom lane