From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT. |
Date: | 2021-11-08 17:47:23 |
Message-ID: | 20211108174723.GI20998@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greetings,
* Andres Freund (andres(at)anarazel(dot)de) wrote:
> On 2021-11-08 12:23:18 -0500, Stephen Frost wrote:
> > though I continue to feel like the function based approach is better.
>
> I think it's a somewhat ugly hack.
I suppose we'll just have to disagree on that. :)
I don't feel as strongly as others apparently do on this point though,
and I'd rather have non-superusers able to run CHECKPOINT *somehow*
than not, so if the others feel like a predefined role is a better
approach then I'm alright with that. Seems a bit overkill to me but
it's also not like it's actually all that much code or work to do.
> > then we must use such an approach no matter how we allow non-superusers to
> > run the command because any approach to that necessarily involves some
> > amount of catalog access.
>
> As long as there's no additional catalog access when the user is known to be a
> superuser, then I think it's fine. There's a difference between doing one
> pg_authid read for superuser - with a fallback to automatically assuming a
> user if one couldn't be found - and doing a full pg_proc read with several
> subsidiary pg_type reads etc.
Yes, the approach I'm suggesting would make the superuser-run CHECKPOINT
be exactly the same as it is today, while a non-superuser trying to run
a CHECKPOINT would end up doing additional catalog accesses.
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2021-11-08 17:49:52 | Re: removing global variable ThisTimeLineID |
Previous Message | Alvaro Herrera | 2021-11-08 17:45:20 | Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT. |