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 1nehT8-0000RP-8i for pgsql-docs@arkaria.postgresql.org; Wed, 13 Apr 2022 18:11:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nehT7-0002gr-2G for pgsql-docs@arkaria.postgresql.org; Wed, 13 Apr 2022 18:11:53 +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 1nehT6-0002gh-Pb for pgsql-docs@lists.postgresql.org; Wed, 13 Apr 2022 18:11:52 +0000 Received: from ewsoutbound.kpnmail.nl ([195.121.94.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nehT4-0003Et-J3 for pgsql-docs@lists.postgresql.org; Wed, 13 Apr 2022 18:11:52 +0000 X-KPN-MessageId: 291e264e-bb55-11ec-a80d-005056aba152 Received: from smtp.kpnmail.nl (unknown [10.31.155.40]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 291e264e-bb55-11ec-a80d-005056aba152; Wed, 13 Apr 2022 20:11:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=content-type:from:to:subject:mime-version:date:message-id; bh=nFlLvBBmhCQjj91+mcJN3qjSzJ/ReYxUkxJ3FQ6LY4k=; b=WKclCdErKe2PLIj7PLdZ7k7FJRr3/MeqzXKkJsjCmGYYTOh8X6e69pl+6DiBQrzfKE7cwoi2YrprX vpEXK2dH3BAt3REDUCumQj6pi36lrufu+fTfZi5HoS8P1CvZSWd+G8m3oraMHxZQ1h14vRm1uGczOt MfJNVIZKoYoJoQN2BFjh+p43yuJ/JPk0vPmf87yIYmHa3Vngb2qGxz5JUJ0ll975CrIrgCN0wala83 1MMIl2nxUKDrKEGK77ewlZFUWC+XNZnG6ViS8pLI7gPgM0gHevFN/chVhOe89Spe0fGq8n6SfNF14Q AmOR97n+58F8fnCa5PRx3gLtzoPLJQw== X-KPN-MID: 33|D41ORyvaUnpvogefJeHFUSIp6y6jiEfZsR2RqdLRexo6ysuiBAvRkiFdEub1jJ6 t7r+w8Epghs//BfqJYCu9SA== X-KPN-VerifiedSender: Yes X-CMASSUN: 33|aGtS25KuY8v6liN0V7BO0tZC0bbmYYPgUbiiuKXXrG4C48nQQqsKyYfLYvit7+j bt5II2TSSRN9reH9OMfJxbw== X-Originating-IP: 45.83.234.25 Received: from [192.168.178.20] (unknown [45.83.234.25]) by smtp.xs4all.nl (Halon) with ESMTPSA id 2ccd2fbd-bb55-11ec-a0a4-005056ab7584; Wed, 13 Apr 2022 20:11:49 +0200 (CEST) Message-ID: <4687b406-252f-c0c4-1ccd-2f1f782db252@xs4all.nl> Date: Wed, 13 Apr 2022 20:11:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: Add further details to ROW SHARE table level lock modes section Content-Language: en-US To: pgsql-docs@lists.postgresql.org References: <202204131800.4kk67cjmeuqh@alvherre.pgsql> From: Erikjan Rijkers In-Reply-To: <202204131800.4kk67cjmeuqh@alvherre.pgsql> 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 Op 13-04-2022 om 20:00 schreef Alvaro Herrera: > On 2022-Apr-04, PG Doc comments form wrote: > >> I propose that it would be useful to explicitly state that `SELECT FOR KEY >> SHARE` AND `SELECT FOR NO KEY UPDATE` commands also acquire the ROW SHARE >> table level lock on target table(s). That is: >> ``` >> Conflicts with the EXCLUSIVE and ACCESS EXCLUSIVE lock modes. >> >> The SELECT FOR UPDATE, SELECT FOR NO KEY UPDATE, SELECT FOR SHARE, and >> SELECT FOR KEY SHARE commands acquire a lock of this mode on the target >> table(s) (in addition to ACCESS SHARE locks on any other tables that are >> referenced but not selected FOR UPDATE/FOR SHARE). >> ``` > > I agree we need an update here. But the original wording seems a bit > off; I think we should say SELECT is a command, and that the FOR bits > are options thereof. Maybe something like this: > > > The SELECT command acquires a lock of this mode > on all tables on which one of the , > , > , or > options is specified > (in addition to ACCESS SHARE locks on any other > tables that are referenced without any explicit > locking option). > > > Thoughts? > > Grammar check: "one of the a,b,c options IS specified" or "one of the > a,b,c options ARE specified"? one [...] IS specified