Avoid extra "skipping" messages from VACUUM/ANALYZE

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Avoid extra "skipping" messages from VACUUM/ANALYZE
Date: 2022-12-14 02:29:56
Message-ID: c0a85c2e83158560314b576b6241c8ed0aea1745.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Right now, if an unprivileged user issues VACUUM/ANALYZE (without
specifying a table), it will emit messages for each relation that it
skips, including indexes, views, and other objects that can't be a
direct target of VACUUM/ANALYZE anyway. Attached patch causes it to
check the type of object first, and then check privileges second.

Found while reviewing the MAINTAIN privilege patch. Implemented with
his suggested fix. I intend to commit soon.

--
Jeff Davis
PostgreSQL Contributor Team - AWS

Attachment Content-Type Size
v1-0001-Clean-up-useless-skipping-messages-for-VACUUM-ANA.patch text/x-patch 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2022-12-14 02:38:15 Document aggregate functions better w.r.t. ORDER BY
Previous Message Masahiko Sawada 2022-12-14 01:43:10 Re: Add index scan progress to pg_stat_progress_vacuum