Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gpcheckcat false alarms for pg_default_acl
gpcheckcat currently flags default privilege objects as having missing dependencies. This is because it searches for dependencies of pg_default_acl oids in pg_depend instead of in pg_shdepend. The fix is to recognize pg_default_acl as a table outside the purview of pg_depend. Minimal repro: postgres=# CREATE ROLE foo; postgres=# ALTER DEFAULT PRIVILEGES FOR ROLE foo REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; postgres=# SELECT oid, * FROM pg_default_acl; oid | defaclrole | defaclnamespace | defaclobjtype | defaclacl -------+------------+-----------------+---------------+------------- 17304 | 17303 | 0 | f | {foo=X/foo} (1 row) postgres=# SELECT * FROM pg_shdepend WHERE objid = 17304; dbid | classid | objid | objsubid | refclassid | refobjid | deptype -------+---------+-------+----------+------------+----------+--------- 12812 | 826 | 17304 | 0 | 1260 | 17303 | o (2 rows) $ gpcheckcat postgres ... Object oid: 17304 Table name: pg_default_acl Name of test which found this issue: dependency_pg_default_acl Table pg_default_acl has a dependency issue on oid 17304 at content -1 Table pg_default_acl has a dependency issue on oid 17304 at content 0 Table pg_default_acl has a dependency issue on oid 17304 at content 1 Table pg_default_acl has a dependency issue on oid 17304 at content 2
- Loading branch information