pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Vacuuming by non owner/super users?
2+ messages / 2 participants
[nested] [flat]

* Vacuuming by non owner/super users?
@ 2021-03-07 23:14  Paul McGarry <paul@paulmcgarry.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Paul McGarry @ 2021-03-07 23:14 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Is it possible for a non-owner or non super user to be given permission to
vacuum tables in the DB?

My initial thought is no, but the documentation says:

"To vacuum a table, one must ordinarily be the table's owner or a
superuser."

Where the "ordinarily" seems to imply there might be some non-ordinary way
of performing a vacuum?
(If it really is just table owner or super user, then the sentence would be
clearer without the "ordinarily").

I am trying to split up DB maintenance, ie would like to give permission to
vacuum DB/tables without giving them full rights to do other stuff on the
tables.

Thanks for any advice.

Paul

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Vacuuming by non owner/super users?
@ 2021-03-07 23:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Paul McGarry <paul@paulmcgarry.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-03-07 23:38 UTC (permalink / raw)
  To: Paul McGarry <paul@paulmcgarry.com>; +Cc: pgsql-general@lists.postgresql.org

Paul McGarry <paul@paulmcgarry.com> writes:
> Is it possible for a non-owner or non super user to be given permission to
> vacuum tables in the DB?
> My initial thought is no, but the documentation says:
> "To vacuum a table, one must ordinarily be the table's owner or a
> superuser."

The full quote is

    To vacuum a table, one must ordinarily be the table's owner or a
    superuser.  However, database owners are allowed to
    vacuum all tables in their databases, except shared catalogs.
    (The restriction for shared catalogs means that a true database-wide
    <command>VACUUM</command> can only be performed by a superuser.)

and as far as I can see, the permissions check in vacuum.c implements that
exactly.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-03-07 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 23:14 Vacuuming by non owner/super users? Paul McGarry <paul@paulmcgarry.com>
2021-03-07 23:38 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox