Index: src/backend/utils/adt/dbsize.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/dbsize.c,v retrieving revision 1.14 diff -c -r1.14 dbsize.c *** src/backend/utils/adt/dbsize.c 29 Aug 2007 17:24:29 -0000 1.14 --- src/backend/utils/adt/dbsize.c 12 Oct 2007 14:38:32 -0000 *************** *** 164,171 **** /* * User must have CREATE privilege for target tablespace, either explicitly * granted or implicitly because it is default for current database. */ ! if (tblspcOid != MyDatabaseTableSpace) { aclresult = pg_tablespace_aclcheck(tblspcOid, GetUserId(), ACL_CREATE); if (aclresult != ACLCHECK_OK) --- 164,175 ---- /* * User must have CREATE privilege for target tablespace, either explicitly * granted or implicitly because it is default for current database. + * + * Specifically check for superuser permissions here, since + * pg_tablespace_aclcheck() will deny access to pg_global even for + * superusers. */ ! if (tblspcOid != MyDatabaseTableSpace && !superuser()) { aclresult = pg_tablespace_aclcheck(tblspcOid, GetUserId(), ACL_CREATE); if (aclresult != ACLCHECK_OK)