Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.
Дата
Msg-id 20211102182614.GC20998@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.  ("Bossart, Nathan" <bossartn@amazon.com>)
Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.  (Daniel Gustafsson <daniel@yesql.se>)
Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Greetings,

* Jeff Davis (pgsql@j-davis.com) wrote:
> On Tue, 2021-11-02 at 11:06 -0400, Robert Haas wrote:
> > Just as a sort of general comment on this endeavor, I suspect that
> > any
> > attempt to lump things together that seem closely related is doomed
> > to
> > backfire.
>
> Agreed, I think that is apparent from the different opinions in this
> thread.
>
> Robert had a good idea over here though:

Think you meant 'Stephen' there. ;)

> https://postgr.es/m/20211101165025.GS20998@tamriel.snowman.net
>
> which gives fine-grained control without the "clutter" of extra
> predefined roles.

Right.

* Bossart, Nathan (bossartn@amazon.com) wrote:
> On 11/2/21, 10:29 AM, "Jeff Davis" <pgsql@j-davis.com> wrote:
> > Great idea! Patch attached.
> >
> > This feels like a good pattern that we might want to use elsewhere, if
> > the need arises.
>
> The approach in the patch looks alright to me, but another one could
> be to build a SelectStmt when parsing CHECKPOINT.  I think that'd
> simplify the standard_ProcessUtility() changes.

For my 2c, at least, I'm not really partial to either approach, though
I'd want to see what error messages end up looking like.  Seems like we
might want to exercise a bit more control than we'd be able to if we
transformed it directly into a SelectStmt (that is, we might add a HINT:
roles with execute rights on pg_checkpoint() can run this command, or
something; maybe not too tho).

> Otherwise, I see a couple of warnings when compiling:
>         xlogfuncs.c:54: warning: implicit declaration of function ‘RequestCheckpoint’
>         xlogfuncs.c:56: warning: control reaches end of non-void function

Yeah, such things would need to be cleaned up, of course.

Thanks!

Stephen

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: should we enable log_checkpoints out of the box?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Eval expression R/O once time (src/backend/executor/execExpr.c)