Re: Granting SET and ALTER SYSTE privileges for GUCs

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Granting SET and ALTER SYSTE privileges for GUCs
Date: 2021-11-23 00:21:42
Message-ID: AAE7FBCE-7C7D-4E92-A57F-D4496B306DDF@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 16, 2021, at 7:03 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> It's also going to be important to think about what happens with
> extension GUCs. If somebody installs an extension, we can't ask them
> to perform a manual step in order to be able to grant privileges. And
> if somebody then loads up a different .so for that extension, the set
> of GUCs that it provides can change without any DDL being executed.
> New GUCs could appear, and old GUCs could vanish.

The v3 patch allows grants on unrecognized guc names. This should allow a grant statement to precede the loading of a new .so which provides the named guc.

> instead just adjust the GRANT command to automatically insert a new
> row into the relevant catalog if there isn't one already. That seems
> nicer for extensions, and also nicer for core GUCs, since it avoids
> bloating the catalog with a bunch of entries that aren't needed.

Grants on GUCs create a new catalog entry if necessary, or update the existing catalog entry if found.

There is a new information_schema.guc_privileges view, not present in v2.

Attachment Content-Type Size
v3-0001-Allow-GRANT-of-SET-and-ALTER-SYSTEM-for-variables.patch application/octet-stream 96.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-11-23 01:01:14 Re: logical decoding and replication of sequences
Previous Message Andres Freund 2021-11-22 23:57:45 Re: Reduce function call costs on ELF platforms