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 1p5VTY-00042B-9i for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:23: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 1p5VTX-0006IK-0U for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:23: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 1p5VTW-0006IB-M7 for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 17:23:22 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5VTU-0003Ph-6B for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 17:23:22 +0000 Received: by mail-pj1-x102d.google.com with SMTP id u5so7652365pjy.5 for ; Wed, 14 Dec 2022 09:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2X4H3bROPXk496/QWG9DN71cwtd6Srrf5tGvyGWIe9Q=; b=PsCr8U6avqXylX/hfnVNLVQKHVfqficoy5cKhbdjIj7WcIn6rRBv4rFRQFBZRETu9g +AXYxthmpmonQ9/bgPUHmy1YhwcvCPtaxbE/WHjkuU+YKRrlKHlcvrXGQxSRxap0zXjJ VsPSEeAVqX4PA+UsW7xgSTKnXCtwBP13msO0OksPPLx6XF80qyoudwOILH2ES4cIHxRK kcJ4RxdqVkLe/Z/6qaJuw6ztAsTdlTb2nOV9MVH6+tEHGkg9yuip7C/C4m2WzcVbWnxd z9bVbQneDJd7XQfvRgK5DIWeq1nIAWpBwrLgDG+77M905BG9Z/pG7LG7qCJq1R58kCeD e6Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2X4H3bROPXk496/QWG9DN71cwtd6Srrf5tGvyGWIe9Q=; b=EEC6kFJNP8q+oVF+UrkieR7yDcN/eLnLzugWo7D8MOH0lWNa3Z/xB1Kp0/TVdl7qls SEs5NtTiG2CeXB0JYlR2etcvjEKmahaaH4p8wxtmUagCraXexhJ+GFWW3ki550UmOO8L J4H0NonBHOhjkqe7G7LxZl8ZJq5LQ80rgDWkqWcHFjaoJFcKR0rEAFNGOhzNpj7gL/I1 2fIa3oxu3UkgoFChBjSXUfFSoIS49rCk8hen55rOyOATjStADLhjgyeDr/Erd5+71pAv rl/dGvFombPTJY/x8/vUKc3tl6HmyNrpis3toWFHO23h5WwVCoq29opvGs5CBwwpyxjA 16Og== X-Gm-Message-State: ANoB5pku5eIuo7BA1XMZStjsAX6nVQdDGZBCHe1XvSdtBBJg3xxye4Wn l46ov+Mr9WUdTvjtmEXgJCY= X-Google-Smtp-Source: AA0mqf5mcGLnuPpMpC6NvXT5UWxVp3Es39dM71IXWlhCDCVbyeO3ZxKBaRu3Y0t3mvBrHJpKnLa/2w== X-Received: by 2002:a17:902:7c0e:b0:18f:9cfb:42aa with SMTP id x14-20020a1709027c0e00b0018f9cfb42aamr13246998pll.10.1671038598078; Wed, 14 Dec 2022 09:23:18 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id h11-20020a170902f54b00b00186ff402525sm2109505plf.213.2022.12.14.09.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 09:23:17 -0800 (PST) Date: Wed, 14 Dec 2022 09:23:15 -0800 From: Nathan Bossart To: Jeff Davis Cc: pgsql-hackers@postgresql.org Subject: Re: Rework confusing permissions for LOCK TABLE Message-ID: <20221214172315.GA689830@nathanxps13> References: <9550c76535404a83156252b25a11babb4792ea1e.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9550c76535404a83156252b25a11babb4792ea1e.camel@j-davis.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Dec 13, 2022 at 06:59:48PM -0800, Jeff Davis wrote: > I can't think of any reason for this behavior, and I didn't find an > obvious answer in the last commits to touch that (2ad36c4e44, > fa2642438f). I can't think of a reason, either. > Patch attached to simplify it. It uses the philosophy that, if you have > permissions to lock at a given mode, you should be able to lock at > strictly less-conflicting modes as well. +1. Your patch looks reasonable to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com