pg_tablespace_size ( name ) → bigintComputes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have
CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database.