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 1mtC1q-0004hC-Iq for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Dec 2021 17:07:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mtC1o-00047M-Ur for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Dec 2021 17:07:20 +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 1mtC1o-00045g-8J for pgsql-hackers@lists.postgresql.org; Fri, 03 Dec 2021 17:07:20 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mtC1j-00035t-AP for pgsql-hackers@postgresql.org; Fri, 03 Dec 2021 17:07:19 +0000 Received: by mail-qk1-x72b.google.com with SMTP id a11so4039915qkh.13 for ; Fri, 03 Dec 2021 09:07:14 -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=j7lw3AuQa9vP1yeIUUpTYEKAcQhTG6g3rQaL4qcWETI=; b=XYgpuc/XanVSe4Wb69a2+T8pRCQLTl6sHYh8QQM1SW4nMEbg/W+R0h9Oh1d96A0nnd odw6j8dtFraDdEWrHZHaa6ENQRRWZRw/jkCsYutbtbC5R8wozhrTxBKLFesJ107pYB2+ JIpLrRpFPGDFNhP0nfQGm0Guq/XQvB8oB1K9Y5zI6LAA9m8ZnjsllYpETEm/AfCyR2jc Bn5xTDTTn4p9/RcyT3b7My19xl9unOa3NfVvEqZlXsRBbUA1FjaBZ2RzsRvMeDQEfH2g TTeTnmhOTJrgKCAx786kz7veaFR/T6IOa/RzRK20dFukeINTqbLyEDEdU0hTpqPbN4ak QyPw== 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=j7lw3AuQa9vP1yeIUUpTYEKAcQhTG6g3rQaL4qcWETI=; b=2NLCAtO9rE8B5kVb7+QCS56p6RJlWh89WI2bzN280JExlcL8GLYcGOLp/LZT/ahghX F9rh2tVvDswRUxkVGNLvFHYEF5tykS4cj5dXnnuAX747XW53QyZvL0/OeGjA6ecB1ExH db/hZLxaN8Zm5q+BBM14TBZbwqP3kNb3DNF2NdJsXnoqTHqOPQ1S8Ayn1Twf/zMn3sNg KHnH4L3U2nhQnYpO0WqHGjSnB6IsaAix717Xg40tSU2PH2ADUEZDgHSC0fIamlRbjzhE dvbWaqNuJi0S8542/UQIZolKyIK6CeeHnemcP3TK3ijuNbuaeBy3koZ6fDtxuEVyZ7lu iKgw== X-Gm-Message-State: AOAM530jMCEYzS4X/uj/IJUPyiRUMb1IqMEEaMwEOGCNxz6VtXl26ReI G8AS5dl7Kh/r7wiMWK2LR/2vzhtmy3IRe/bGEOIN28nMvQU63DMK6kBRbnr4r4lion4+lWQwNbg UGE082pPQQiBQE8VATeA4wvp3oBT7HyjtNfyQ5uC7C/+rJrvaVWih5RmKuCIsZr7fQNeuL4p9BT MUsIsg9bZZhNlVg5sau9E5J5AGvcu0o74HraHu X-Google-Smtp-Source: ABdhPJxBqkWSofTjHArivtE2AruyU7l/6g9gLVaYvL7JgiS8tgto2rYWb8TfT3OX3Pze88Pl4cJGtg== X-Received: by 2002:a37:b14:: with SMTP id 20mr18766990qkl.738.1638551233209; Fri, 03 Dec 2021 09:07:13 -0800 (PST) Received: from [172.20.10.2] (100.sub-174-204-140.myvzw.com. [174.204.140.100]) by smtp.gmail.com with ESMTPSA id w10sm2787685qtj.37.2021.12.03.09.07.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Dec 2021 09:07:12 -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: Fri, 3 Dec 2021 05:31:46 -0800 Cc: Jeff Davis , Andrew Dunstan , PostgreSQL-development , Robert Haas Content-Transfer-Encoding: quoted-printable Message-Id: <7A34E620-0D86-4720-91A3-624C0B8C1A6C@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> 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 2, 2021, at 1:29 AM, Amit Kapila = wrote: >=20 > If we want to maintain the property that subscriptions can only be > owned by superuser for your first version then isn't a simple check > like ((!superuser()) for each of the operations is sufficient? As things stand today, nothing prevents a superuser subscription owner = from having superuser revoked. The patch does nothing to change this. > In (2), I am not clear what do you mean by "the old owner has > privileges increased"? If the owners can only be superusers then what > does it mean to increase the privileges. The old owner may have had privileges reduced (no superuser, only = permission to write into a specific schema, etc.) and the subscription = enabled only after those privilege reductions were put in place. This = is a usage pattern this patch is intended to support, by honoring those = privilege restrictions. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company