Skip to content

Conversation

msdousti24
Copy link

@msdousti24 msdousti24 commented Jul 28, 2025

The MAINTAIN privilege is added in Postgres 17 (see here). Without it, even the owner of the table cannot perform tasks like VACUUM, ANALYZE, or REINDEX.

Upon adding this privilege, we got this error:

Error: MAINTAIN is not an allowed privilege for object type table

Upon a closer investigation, the list of table privileges in allowedPrivileges needs to be augmented.

The following query on Postgres 17 shows all valid privilesges for different types of Postgres objects:

with t(col) as (
  select string_to_table('cdfFlLnprsStT', null)
)
select col as object_type, array_agg(privilege_type) as privileges
from t
join lateral aclexplode(acldefault(col::"char", 0)) as a on true
group by 1
order by 1;

Result:
image

@logan-hcg
Copy link

also see #516

@msdousti24
Copy link
Author

Closed as duplicate of #516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants