From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: is_superuser versus set_config_option's parallelism check |
Date: | 2024-08-09 20:30:21 |
Message-ID: | ZrZ8XZy1-aTS_yWx@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 09, 2024 at 04:04:15PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
>> From a couple of quick tests, it looks like setting
>> "current_role_is_superuser" directly works.
>
> Yeah, I had been thinking along the same lines. Here's a draft
> patch. (Still needs some attention to nearby comments, and I can't
> avoid the impression that the miscinit.c code in this area could
> use refactoring.)
Hm. That's a bit more code than I expected.
> A problem with this is that it couldn't readily be back-patched
> further than v14, since we didn't have ReportChangedGUCOptions
> before that. Maybe that doesn't matter; given the lack of
> previous complaints, maybe we only need to fix this in HEAD.
Another option might be to introduce a new GUC flag or source for anything
we want to bypass the check (perhaps with the stipulation that it must also
be marked PGC_INTERNAL). I think a new flag would require moving the
parallel check down a stanza, but that seems fine. A new source would
allow us to limit the damage to specific SetConfigOption() call-sites, but
I haven't thought through that idea fully.
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-08-09 20:42:56 | Re: is_superuser versus set_config_option's parallelism check |
Previous Message | Tristan Partin | 2024-08-09 20:16:58 | Re: Remaining dependency on setlocale() |