pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul McGarry <paul@paulmcgarry.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Vacuuming by non owner/super users?
Date: Sun, 07 Mar 2021 18:38:54 -0500
Message-ID: <1686760.1615160334@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPrE0SYPGJAmYYz1w5hhUeYg_QmUYxoAxHEaPYRQ-y7YhpDsJQ@mail.gmail.com>
References: <CAPrE0SYPGJAmYYz1w5hhUeYg_QmUYxoAxHEaPYRQ-y7YhpDsJQ@mail.gmail.com>

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





view thread (2+ messages)

Message-ID: <1686760.1615160334@sss.pgh.pa.us>
Permalink:  ../1686760.1615160334@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1686760.1615160334@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, paul@paulmcgarry.com
  Subject: Re: Vacuuming by non owner/super users?
  In-Reply-To: <1686760.1615160334@sss.pgh.pa.us>
  References: <CAPrE0SYPGJAmYYz1w5hhUeYg_QmUYxoAxHEaPYRQ-y7YhpDsJQ@mail.gmail.com> <1686760.1615160334@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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