From: | "Bossart, Nathan" <bossartn(at)amazon(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>, 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-01 17:23:35 |
Message-ID: | 8B7DFC0A-9CF9-4620-9FDD-D1A4C8269B68@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/1/21, 9:51 AM, "Stephen Frost" <sfrost(at)snowman(dot)net> wrote:
> I don't really buy off on the "because it's been around a long time" as
> a reason to invent a predefined role for an individual command that
> doesn't take any options and could certainly just be a function.
> Applications developed to run as a superuser aren't likely to magically
> start working because they were GRANT'd this one additional predefined
> role either but likely would need other changes anyway.
I suspect the CHECKPOINT command wouldn't be removed anytime soon,
either. I definitely understand the desire to avoid changing
something that's been around a long time, but I think a function fits
better in this case.
> All that said, I wonder if we can have our cake and eat it too. I
> haven't looked into this at all yet and perhaps it's foolish on its
> face, but, could we make CHECKPOINT; basically turn around and just run
> select pg_checkpoint(); with the regular privilege checking happening?
> Then we'd keep the existing syntax working, but if the user is allowed
> to run the command would depend on if they've been GRANT'd EXECUTE
> rights on the function or not.
I'd be worried about the behavior of CHECKPOINT changing because
someone messed with the function.
Nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-11-01 17:32:41 | Re: inefficient loop in StandbyReleaseLockList() |
Previous Message | Bossart, Nathan | 2021-11-01 17:02:49 | Re: inefficient loop in StandbyReleaseLockList() |