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 1mubsy-0001ND-7x for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Dec 2021 14:56:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mubsw-00081v-08 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Dec 2021 14:56:02 +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 1mubsv-00081Y-BT for pgsql-hackers@lists.postgresql.org; Tue, 07 Dec 2021 14:56:01 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mubsp-0000r4-Eu for pgsql-hackers@postgresql.org; Tue, 07 Dec 2021 14:56:00 +0000 Received: by mail-pl1-x62b.google.com with SMTP id b11so9588094pld.12 for ; Tue, 07 Dec 2021 06:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OtPyEwfRjPHL8wzTmPUI1n3c7QCaA4D1U9dFBO8S6dU=; b=DqFfXiZyZwRi8HhnyaJaOgt7jlazEfW94JJRtlcxvwhwujza5KI0S1LqIbD2+3Ic/K 236WHdVRRyX3V35aKPsnWCedqdZ7B4gaA0vo/1GgCuG8dqQEevvbypyVZTCvGXoHi8zc ctdGSuix2y3jTRW8sSrWfG8AOBkE1Iz4+FPlCQU9Z/KGhlZDeFVAkC0kN/7BD83IjQPw IqJYEaZTpt4zYopxUpb/Rm5K76Z5zL9jgZkJbnObHaFcKhHiX3zy7fNh5nP9rooFedEQ 86j3IFXvRRb6GzXlXCUnJ7LTYOgKaExJ7KGeF+f7NvSfWRfGAX0UXNBUSvhDF+iKd7zK J3Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OtPyEwfRjPHL8wzTmPUI1n3c7QCaA4D1U9dFBO8S6dU=; b=VyZKbaLpFXrC9ptA5XD6fpCI7A5tkNcZfwdAQRw0lXrx2QWEkPk3bL32Z51TU1kt+5 mrdR1CQDoLnh8C5TA8+yZDThJsGipukbtgb0WjvHWeFrUwbjbgRhhmQC4+u/LGpzZ3uF 3M3K3JfDwrkycu3YPXkEXzWazYy61h0Ey6TsLbvnGu4rJCYkyY6OxDuFLT2ORahWXoPT QdzZ+omAW1edKBxrInOumvBB+7HV4SQUMWDG7a46zfHRQhxHupNQ0LSmDtYZPmXAFbPO /taGCekpahSwWzoDVfEvopdqOomVIOSaoERUrRCW+RrMHFFx17g0NNt3Mfm8joTZjogw NEwA== X-Gm-Message-State: AOAM531EVdvaQTdiXnsFq3z63bRo5hvF8Bo2swvRgDQL5vvKPl0szpM2 yoVZVVpD06N+Inn4Qw4K6QO2xgh/MGr7m/ewO1O4ubJOFXLyFJacWjvZHtTJWKaob1PQK5IwhEc jy4kS1ufMF8VGRO3HCtl74VukQXu7v98D43X3fw718UUry1Gd3FIAh8mc1HrtQ00etN4jbNNWLV uvPTZrdWmkk3s0ay3vc0CV92yJv20sZUimL2um X-Google-Smtp-Source: ABdhPJxgpJDDVnDEqxDBKKcbWJgLP3nUIU+rZCdzm2/FHBVfjwTI5a7TwKpwbUig1NRSiz2sODYR2A== X-Received: by 2002:a17:90b:4a50:: with SMTP id lb16mr7266342pjb.37.1638888952770; Tue, 07 Dec 2021 06:55:52 -0800 (PST) Received: from laptop280-ma-us.hitronhub.home (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id q10sm14274788pfk.180.2021.12.07.06.55.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 06:55:52 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Non-superuser subscription owners From: Mark Dilger In-Reply-To: Date: Tue, 7 Dec 2021 06:55:51 -0800 Cc: Jeff Davis , Andrew Dunstan , PostgreSQL-development , Robert Haas Content-Transfer-Encoding: quoted-printable Message-Id: <8BADB085-239C-4572-847D-99AA1DB84E36@enterprisedb.com> 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> <18b267939a9d1ae27e9b3643d53395f4e29ea6ce.camel@j-davis.com> <785e8b8ab06f123cf754862557bd3171aeba4d65.camel@j-davis.com> <4E93F649-C11A-40F0-BE34-6AB45507B807@enterprisedb.com> <7A34E620-0D86-4720-91A3-624C0B8C1A6C@enterprisedb.com> <4901C87E-AB16-4552-88B8-2DB204F61D7E@enterprisedb.com> To: Amit Kapila X-Mailer: Apple Mail (2.3608.120.23.2.7) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Dec 7, 2021, at 2:29 AM, Amit Kapila = wrote: >=20 > Okay, let me try to explain again. Following is the text from docs > [1]: " (a) To create a subscription, the user must be a superuser. (b) > The subscription apply process will run in the local database with the > privileges of a superuser. (c) Privileges are only checked once at the > start of a replication connection. They are not re-checked as each > change record is read from the publisher, nor are they re-checked for > each change when applied. >=20 > My understanding is that we want to improve what is written as (c) > which I think is the same as what you mentioned later as "Fix the > current bug wherein subscription changes are applied with superuser > force after the subscription owner has superuser privileges revoked.". > Am I correct till here? If so, I think what I am suggesting should fix > this with the assumption that we still want to follow (b) at least for > the first patch. Ok, that's a point of disagreement. I was trying to fix both (b) and = (c) in the first patch. > One possibility is that our understanding of the > first problem is the same but you want to allow apply worker running > even when superuser privileges are revoked provided the user with > which it is running has appropriate privileges on the objects being > accessed by apply worker. Correct, that's what I'm trying to make safe. > We will talk about other points of the roadmap you mentioned once our > understanding for the first one matches. I am happy to have an off-list phone call with you, if you like. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company