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 1n6FJA-0004c1-Oq for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 17:15:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6FJ7-0000jR-TZ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 17:15:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6FJ7-0000jI-G9 for pgsql-hackers@lists.postgresql.org; Sat, 08 Jan 2022 17:15:09 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n6FJ0-0001c3-L4 for pgsql-hackers@postgresql.org; Sat, 08 Jan 2022 17:15:08 +0000 Received: by mail-pl1-x630.google.com with SMTP id u16so8131649plg.9 for ; Sat, 08 Jan 2022 09:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=pHzCbCZj+QNCuMQ/KVZXFnZVz0vBTZlpqPHSQBA1KHw=; b=GPxp3Ou50y3LtFg01vzaEZ2Mt7WzZUDNqWNBp0GrGRnaZ1/uTCojc31DKLi2s3Eeo/ pn47qzGgTI5zjNRFpUPNYnebKlmlggac29ss4owuUw3bTiSpI7tJ0Jl3Sb8T9R09ExRU E8Nav0HZS/u+j061je8WU+BSujEyryEwKQue2mimeIG8jQQq0/sEFhoCAl6dogdQF00l +bdtYdzyHj+D/vWEh5LYHwEhoW29G3D/FuwxQNssbdZoPh27E3J6QAJBMYvLGagge1Q3 Q3T2keUFZAKw/c+1NA77ktCfIdJy+k1LnqHbMmWpMT5Bc40/OTg31mVhL6nRqE1UzfaL LaxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=pHzCbCZj+QNCuMQ/KVZXFnZVz0vBTZlpqPHSQBA1KHw=; b=PsytQ1Gz3bJuI5zzpyo/PITcHcckXGzi3S6RnFlemhVPsLb8pGLirfPVx8i7ZH69+l yDo8hGVREWuhZFDamzBt/vT/sn1AE/b7+3sWyQV4yB/ijbRhO7pERk76vOXNFH0nO75T 0CIaNf/IiqUo4oG2QXYB9BLjAO+HYzYNAarKgz5/SDkrJSyMuHQ23loGe5g3I+6RWDUx LWyP70Wps0zxpweVMswCyWGYkjDMxCpf4FXIKGvglfvVdlaojUvuEr4z4Jqt4qXicL2Z hOjPEIQ6rgzIF3GKJaiDilGynrSjD2BDoQyHriCcOTtOz8aLvQm7SCK9l04lGYfeNL9l Cyeg== X-Gm-Message-State: AOAM533urhgIse5KFNN6QE2bF0fAUIN/pMxcjTzQpUASKVvxZt1pCd9w K89FBotvWmwdUuBvd2tMtbmLJQ== X-Google-Smtp-Source: ABdhPJxpnrCsbGeNFS0CGfsQHhVpZZHD9ZAWZRY2Ez4/sUtNsCzePfzV2EgFGPs0KoMa+WjfdXDV/g== X-Received: by 2002:a05:6a00:1305:b0:4a2:75cd:883b with SMTP id j5-20020a056a00130500b004a275cd883bmr69011164pfu.44.1641662101417; Sat, 08 Jan 2022 09:15:01 -0800 (PST) Received: from jdavis.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id j8sm2725774pfc.11.2022.01.08.09.15.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Jan 2022 09:15:00 -0800 (PST) Message-ID: <3c86885b0facc66eede94113123c1c3be39837fe.camel@j-davis.com> Subject: Re: Non-superuser subscription owners From: Jeff Davis To: Amit Kapila Cc: Mark Dilger , Andrew Dunstan , PostgreSQL-development , Robert Haas Date: Sat, 08 Jan 2022 09:14:59 -0800 In-Reply-To: References: <9DFC88D3-1300-4DE8-ACBC-4CEF84399A53@enterprisedb.com> <6BB4451E-7B1B-474C-BD1F-DB7531E720C6@enterprisedb.com> <6A2B0FF6-CC86-48CE-B0D3-5401AA5CFEA9@enterprisedb.com> <1BB0A553-3FE9-4A91-A975-6F9D8C157FBD@enterprisedb.com> <7C62876F-5D19-4B5C-96AC-5590B10A49B2@enterprisedb.com> <66f55a6b9ff7bdd6bfd0d05e8fd8351690e69e23.camel@j-davis.com> <92BEDE2A-8043-4F50-9BD8-46977A9A2972@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2022-01-08 at 15:35 +0530, Amit Kapila wrote: > On Sat, Jan 8, 2022 at 1:01 PM Jeff Davis wrote: > > > > On Sat, 2022-01-08 at 12:27 +0530, Amit Kapila wrote: > > > For Update/Delete, we do read the table first via > > > FindReplTupleInLocalRel(), so is there a need to check ACL_SELECT > > > before that? > > > > If it's logically an update/delete, then I think ACL_UPDATE/DELETE > > is > > the right one to check. Do you have a different opinion? > > > > But shouldn't we do it the first time before accessing the table? I'm not sure I follow the reasoning. Are you saying that, to logically replay a simple DELETE, the subscription owner should have SELECT privileges on the destination table? Is there a way that a subscription owner could somehow exploit a DELETE privilege to see the contents of a table on which they have no SELECT privileges? Or is it purely an internal read, which is necessary for any ordinary local DELETE/UPDATE anyway? Regards, Jeff Davis