I'm looking for some help identifying a permission I need to grant to prevent an error in a proprietary app. The App is loading data into an AWS RDS postgresql database. Loading data is working fine. But when the app attempts to collect it's own statistics it raises an error:

Error extracting database space statistics: ERROR: permission denied for tablespace pg_global

The app is hard-coded to check the space available in the database. I can't change that. I suspect it's executing pg_tablespace_size documented here for postgres 14.

I've tried to grant the user CREATE permission on tablespace pg_global but even my RDS "admin" user get's an access denied error when I try:

GRANT CREATE ON TABLESPACE pg_default TO "app-user-common"
ERROR:  permission denied for tablespace pg_default
SQL state: 42501

Though the admin user itself is able to execute pg_tablespace_size('pg_global')

Primarily I want to prevent the app reporting an error, as these errors can hide other more serious errors being reported by the app.

I'd like to know what permissions I need to grant to let this work.


1 Answer 1


At this time I've found no way to directly grant the necessary CREATE permission on the table-space to any user. For whatever RDS doesn't allow you to grant that directly.

However the permission has been granted to a few of the existing database roles including the rds_admin role. Obviously that one is too permissive. So what fixed it for me was to grant the pg_monitor to the app user:

GRANT pg_monitor TO "app-user-common"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.