BUG #19475: VACUUM on a partition still warns after MAINTAIN is granted on the partitioned parent

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: 798604270(at)qq(dot)com
Subject: BUG #19475: VACUUM on a partition still warns after MAINTAIN is granted on the partitioned parent
Date: 2026-05-11 07:41:42
Message-ID: 19475-513aa13168f22afe@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19475
Logged by: Chi Zhang
Email address: 798604270(at)qq(dot)com
PostgreSQL version: 18.3
Operating system: Ubuntu 24.04
Description:

Hi,

I tested the current PostgreSQL master at commit 901ed9b352b (postgres
--version reports PostgreSQL 19devel). The current branch already contains
commit ff9618e82a466fc9c635f9f087776e57b21e4f14, whose commit message says:

“For partitions, allow the maintenance command if the user has the MAINTAIN
privilege on the partition or any parent.”

However, the following test case still produces a permission warning when
VACUUM is run directly on a partition after granting MAINTAIN only on its
partitioned parent.

Reproduction:

```
CREATE TABLE parent (a int) PARTITION BY RANGE (a);
CREATE TABLE child PARTITION OF parent
FOR VALUES FROM (0) TO (100);
INSERT INTO parent VALUES (1), (2), (3);

GRANT MAINTAIN ON parent TO main_role;

SET client_min_messages = warning;
SET ROLE main_role;

VACUUM child; -- WARNING: permission denied to vacuum "child", skipping it

```

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Bossart 2026-05-11 14:24:02 Re: BUG #19475: VACUUM on a partition still warns after MAINTAIN is granted on the partitioned parent
Previous Message PG Bug reporting form 2026-05-09 02:22:23 BUG #19474: LIKE with nondeterministic collations mis-handle literal backslashes in patterns containing escape