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 1mnNJm-0007Qd-Fs for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Nov 2021 15:57:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mnNJl-0005QW-9H for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Nov 2021 15:57:49 +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 1mnNJk-0005QN-M1 for pgsql-hackers@lists.postgresql.org; Wed, 17 Nov 2021 15:57:49 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mnNJg-0004OO-1o for pgsql-hackers@postgresql.org; Wed, 17 Nov 2021 15:57:47 +0000 Received: by mail-pj1-x1030.google.com with SMTP id gt5so2712000pjb.1 for ; Wed, 17 Nov 2021 07:57:43 -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=dZLTZPmEDand+iuo0NjkeNAKGYkOTm09xxZFswooee0=; b=PHgTsE/o6C8RlRTVoSQBbIvwLNL7LkzbstzsKalKPZCHnqs1jKM89FhvewchfbsZtR 7n7fXbkKIOr5afHddVXyyEIMkftFaxvKH7EbcGLnuBlGDWMNT94doK1kI28Hjr6PKX96 NKEQfFOfB1sNoCIvboKprQ+MRWbFWrs5wz3ZgeglqlEywEW3APWzj8SaqQGyIp2tL5Hi M2RxDjR4tK/OlL54/bW5E67mr4NMzMTf26vM7A8p+AI5GksfpjBlFBmwPSZfo0l3x5GF Jqqf9Wa1ZnS9Fm5ZuTB87yl/RTMXCSLGP3Bc8reRR8S2ut4rUxP/c8M/PNKOH46w9vVY MjRw== 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=dZLTZPmEDand+iuo0NjkeNAKGYkOTm09xxZFswooee0=; b=A7pGrEpuE3Y27Pb0CJFj8N7NQChXU3yLJhMz8ILrD+IiGlwPDTHMgfev9DAqFOILuK qWrT3/RkWmeqng/0nnNerheYQcLIAxDBsSHRQp+gEFIijkyvQyEqq9JT8ZnZqYziz9FU e2U22lTrkBbhNcI0TeghKDcuTT++2Qwt97/h1mCL+MCZ+EVxMVwD5h6T8CNaJJ1P8r/h 0iAUvvUF0J4V7yJ5ZHHFsguim98GSH8IolxkUB4HKmmMTU/au2U1worWRzKNJjgbHlDM KGTqZOkD6m0QAKE+qpzc0Cre5WO/iALE/u1WdS8OE/16VwL50SgejTHoRb2UrMLLyQPL vIVQ== X-Gm-Message-State: AOAM530NlZfAKTqcomEgTldlfm2tweRFzgabpX4KhqlPojrRbY87860G Y/HiLAMQ+DuUKGw9cxsiH2o8lKjGFb1SXMh3UKl99bGa0KDYytaYv63iwNy9kARPatlep83go1c tuJ27C0L3ykOtOlJH79onB4OeiGOH/fECJZgjruqfY0LJMHCAnBpt1U2QEgBMiuBgeo86YMAsMI gVFxY3uxURgMKB3nAthqAj4XPuVYWS7CkBXk0i X-Google-Smtp-Source: ABdhPJzQmk1n4hOIwffRlKLLrWMJam3Hg4D88h3h6m8xlTwSOhjoeYK4B6pHnO4DC6xLzhgYsMFUjg== X-Received: by 2002:a17:90b:1b03:: with SMTP id nu3mr840387pjb.47.1637164662465; Wed, 17 Nov 2021 07:57:42 -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 j6sm122218pgf.60.2021.11.17.07.57.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Nov 2021 07:57:41 -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: Date: Wed, 17 Nov 2021 07:57:41 -0800 Cc: Tom Lane , Andrew Dunstan , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: 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> <8F320DC8-C312-40C0-AF41-7B3D8F21584A@enterprisedb.com> To: Robert Haas 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 17, 2021, at 5:32 AM, Robert Haas = wrote: >=20 >> I was aware of that, but figured not all GUCs have to be grantable. = If it doesn't fit in a NameData, you can't grant on it. >=20 > Such restrictions are rather counterintuitive for users, and here it > doesn't even buy anything. Using 'text' rather than 'name' as the data > type isn't going to cost any meaningful amount of performance. That sounds fine. >> If we want to be more accommodating than that, we can store it as = text, just like pg_db_role_names does, but then we need more code = complexity to look it up and to verify that it is unique. (We wouldn't = want multiple records for the same pair.) >=20 > If you're verifying that it's unique in any way other than using a > unique index, I think you're doing it wrong. No, I'm using a unique index. I was overthinking it, concerned about = changing from name_ops to text_ops and needing the toast table, but = that's silly, because I need one for the acl anyway. > Also, maybe I'm confused here, but why isn't the schema: >=20 > gucoid > gucname > gucacl It is, both in v2 already posted, and in the v3, written but not yet = posted, as I haven't finished the pg_dump work, and also I'm waiting to = see how this discussion gets resolved before asking for a review of v3. > IOW, I don't understand why this table has as the primary > key rather than just guc. I was responding to Tom's recommendation that I follow the pattern in = pg_db_role_setting, and speculating how that would work. I was not = proposing to do it that way. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company