Re: Granting SET and ALTER SYSTE privileges for GUCs

Mark Dilger <mark.dilger@enterprisedb.com>

From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Joshua Brindle <joshua.brindle@crunchydata.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Robert Haas <robertmhaas@gmail.com>, Jeff Davis <pgsql@j-davis.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, Joe Conway <joe@crunchydata.com>
Date: 2022-01-31T19:17:12Z
Lists: pgsql-hackers

Attachments


> On Jan 26, 2022, at 7:24 AM, Mark Dilger <mark.dilger@enterprisedb.com> wrote:
> 
> Rebased:
> 
> <v7-0001-Allow-GRANT-of-SET-and-ALTER-SYSTEM-SET-for-gucs.patch>

Hackers,

Joshua and I had some off-list back-and-forth on this patch and I think the attached v8 patch meets his needs.  Specifically, v8 adds support for object access hooks in the case of SET and ALTER SYSTEM SET of a guc variable.

The way InvokeObjectPostAlterHookArg() is written, it expects some things like a Oid that we don't always have.  I abused the parameters of that function to pass as much information as possible.  Anyone wanting to review this might consider how that is coded.

Joshua, this is byte-for-byte the same patch that you already reviewed off-list (or I attached the wrong patch!)  If you are satisfied, could you set the status to ready-for-committer?


Commits

  1. Allow granting SET and ALTER SYSTEM privileges on GUC parameters.