| 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 19:26:44 |
| Message-ID: | ZrZtdPcy2eEhcKr-@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Aug 09, 2024 at 02:43:59PM -0400, Tom Lane wrote:
> The simplest fix would be to hack this test to allow the action anyway
> when context == PGC_INTERNAL, excusing that as "assume the caller
> knows what it's doing". That feels pretty grotty though. Perhaps
> a cleaner way would be to move this check to some higher code level,
> but I'm not sure where would be a good place.
From a couple of quick tests, it looks like setting
"current_role_is_superuser" directly works. That's still grotty, but at
least the grottiness would be localized and not require broad assumptions
about callers knowing what they're doing when using PGC_INTERNAL. I
wouldn't be surprised if there are other problems with this approach, too.
--
nathan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2024-08-09 19:26:46 | Re: Restart pg_usleep when interrupted |
| Previous Message | Nathan Bossart | 2024-08-09 19:03:55 | Re: Restart pg_usleep when interrupted |