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.