diff options
author | Jeff Davis <jdavis@postgresql.org> | 2023-01-13 14:42:03 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2023-01-13 14:42:03 -0800 |
commit | d46a9792a8ebbbed7792b26d6dc0222d2bbde223 (patch) | |
tree | 29d6caeae0c0b00f8dd9e06bda653bd550985965 /src | |
parent | c44f6334ca6ff6d242d9eb6742441bc4e1294067 (diff) | |
download | postgresql-d46a9792a8ebbbed7792b26d6dc0222d2bbde223.tar.gz postgresql-d46a9792a8ebbbed7792b26d6dc0222d2bbde223.zip |
Clean up useless "skipping" messages for VACUUM/ANALYZE.
When VACUUM/ANALYZE are run on an entire database, it warns of
skipping relations for which the user doesn't have sufficient
privileges. That only makes sense for tables, so skip such messages
for indexes, etc.
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/c0a85c2e83158560314b576b6241c8ed0aea1745.camel%40j-davis.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/vacuum.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index c4ed7efce36..ea1428dc8c0 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -906,10 +906,6 @@ get_all_vacuum_rels(int options) MemoryContext oldcontext; Oid relid = classForm->oid; - /* check permissions of relation */ - if (!vacuum_is_permitted_for_relation(relid, classForm, options)) - continue; - /* * We include partitioned tables here; depending on which operation is * to be performed, caller will decide whether to process or ignore @@ -920,6 +916,10 @@ get_all_vacuum_rels(int options) classForm->relkind != RELKIND_PARTITIONED_TABLE) continue; + /* check permissions of relation */ + if (!vacuum_is_permitted_for_relation(relid, classForm, options)) + continue; + /* * Build VacuumRelation(s) specifying the table OIDs to be processed. * We omit a RangeVar since it wouldn't be appropriate to complain |