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 1mn6tI-0008Sf-Bx for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Nov 2021 22:25: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 1mn6tG-0001NK-Dl for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Nov 2021 22:25:22 +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 1mn6tF-0001N9-Pc for pgsql-hackers@lists.postgresql.org; Tue, 16 Nov 2021 22:25:22 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mn6tA-00009t-MA for pgsql-hackers@postgresql.org; Tue, 16 Nov 2021 22:25:20 +0000 Received: by mail-pg1-x52e.google.com with SMTP id r5so415472pgi.6 for ; Tue, 16 Nov 2021 14:25:15 -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=L/eK+RN6KeHR1X2lrJYt93nQzxgC2df6VLtHzZcGQco=; b=LZBvsD/qMI0d1n5MVndmXvW2UOh6i+5vIqYCNQTEhxGNwv0bRNtA2kUyW6ihassoWb oYjmawBhSyZR8+JW+dax6gJaWN6HZ3KCFi37G2ikevj3Bhu497acxMgYtPjUs6RfcWMS s+7jscMm7vML+t12bdntvmKdKYNxKqyL8xfM0ZAaHfI4ZE8jvTIl4OYTS6sHbYolGhMM S7dEF0eb3os7zdpy/7Tirfs4yY6CR2yjQHuImynQYCUxzoW4dg7cDWDnSEc8YS6R+qdg FqZ2zIUa809ZzHBuw4sF2P1VUlXkoiJrQadQTCpoSUP+HhfOui8Dsho1Q+BOIMxLUnRX 5+Tg== 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=L/eK+RN6KeHR1X2lrJYt93nQzxgC2df6VLtHzZcGQco=; b=GZ6fE0luvCbYo6bcMDfNbZdCE45y/MCU+buEEDCat58uWbDR9gfZtgK8TWg6gGATl2 DGD2/R2EZFGcJkqgOSRFr/BPS2qiA+TRujKNCu1jsBGvh7rsisXeDK9H/p+TSJ2bpQ0I laHaxoFF7LzOvLXuBfzVMH/5Egt44NcsTF2HQSK3qCbH7rnYL1p6AoFr6zBEp8+5UBgO iFeZCZ+E+MLokJNHJ7QPgom8iMQZgh8cWirrfz7ZKh54dHi4BBhSkeSyglmR+kKv4enB R+7slSc2G6FYNn9JUEQ7BuuIErgZ6yf0zfppf7LNTvrx2GzspS8bu8+3MkjQLmCRjHua 3GPQ== X-Gm-Message-State: AOAM533i+xDehOnM0ND1Ez8JM8PBPDq7C051n6OOVJIb7lSd+wzPgpt7 UQGwU+zvKv2EMQ3WSRRUeUSR0CM7DoX24RUzLjdBXlrKmKw38BoQFj1OmGZSoe6IToNKWW0NkzR oXHvmoXXe/9WILpDCylwe4JFxKQtWo40ttCeijD26A+CNEpEK9TClnmaspG3ItJsWVlE68d0Ux9 Uf5xYfSCv2dDlaZFusGf2sqspywqznh9qfTe7a X-Google-Smtp-Source: ABdhPJwsAdEoNH6TFIcsDzdWaLnEVuVFRWTfvSym0VT0u5RAw8Mlni2M2nsqu4Inf+yI7393S2T/+A== X-Received: by 2002:a63:82c6:: with SMTP id w189mr1710914pgd.385.1637101513720; Tue, 16 Nov 2021 14:25:13 -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 q18sm21744538pfj.46.2021.11.16.14.25.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Nov 2021 14:25:13 -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: Granting SET and ALTER SYSTE privileges for GUCs From: Mark Dilger In-Reply-To: <2347082.1637100769@sss.pgh.pa.us> Date: Tue, 16 Nov 2021 14:25:12 -0800 Cc: Andrew Dunstan , Robert Haas , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: <9F2C67AB-D357-4353-8172-E82E54A52107@enterprisedb.com> References: <3D691E20-C1D5-4B80-8BA5-6BEB63AF3029@enterprisedb.com> <2226110.1637075835@sss.pgh.pa.us> <2226903.1637076537@sss.pgh.pa.us> <2231899.1637081047@sss.pgh.pa.us> <38BEC583-DB34-4918-BCBC-DC896F0D3844@enterprisedb.com> <055d86ff-9c95-f1d4-c974-29896767561e@dunslane.net> <7DFFECF0-373B-40B0-BCA0-A5ADD9266FFA@enterprisedb.com> <2347082.1637100769@sss.pgh.pa.us> To: Tom Lane 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 Nov 16, 2021, at 2:12 PM, Tom Lane wrote: >=20 > The question is why you need pg_config_param at all, then. > AFAICS it just adds maintenance complexity we could do without. > I think we'd be better off with a catalog modeled on the design of > pg_db_role_setting, which would have entries for roles and lists > of GUC names that those roles could set. Originally, I was trying to have dependency linkage between two proper = types of objects, so that DROP ROLE and DROP CONFIGURATION PARAMETER = would behave as expected, complaining about privileges remaining rather = than dropping an object and leaving a dangling reference. I've deleted the whole CREATE CONFIGURATION PARAMETER and DROP = CONFIGURATION PARAMETER syntax and implementation, but it still seems = odd to me that: CREATE ROLE somebody; GRANT SELECT ON TABLE sometable TO ROLE somebody; GRANT ALTER SYSTEM ON someguc TO ROLE somebody; DROP ROLE somebody; ERROR: role "somebody" cannot be dropped because some objects depend = on it DETAIL: privileges for table sometable would not mention privileges for "someguc" as well. That's why I want = configuration parameters to be proper objects with OIDs and with entries = in pg_depend and/or pg_shdepend. Maybe there is some better way to do = it, but that's why I've been doing this. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company