Hi all, (Andrew in CC.) When running installcheck multiple times under src/test/modules/, we are getting two failures as of test_pg_dump and test_oat_tests, because these keep around some roles created by the tests.
Keeping around a role for test_pg_dump has been discussed already, where the buildfarm can use that for pg_upgrade, and because there are many objects that depend on the role created: https://www.postgresql.org/message-id/20180904203012.gg20...@paquier.xyz Note that it would require a DROP OWNED BY and DROP ROLE, but anyway: --- a/src/test/modules/test_pg_dump/sql/test_pg_dump.sql +++ b/src/test/modules/test_pg_dump/sql/test_pg_dump.sql @@ -106,3 +106,5 @@ ALTER EXTENSION test_pg_dump DROP SERVER s0; ALTER EXTENSION test_pg_dump DROP TABLE test_pg_dump_t1; ALTER EXTENSION test_pg_dump DROP TYPE test_pg_dump_e1; ALTER EXTENSION test_pg_dump DROP VIEW test_pg_dump_v1; +DROP OWNED BY regress_dump_test_role; +DROP ROLE regress_dump_test_role; As far as I can see, test_oat_hook has no need to keep around the extra role it creates as part of the regression tests, because at the end of the test there are no objects that depend on it. Wouldn't it be better to make the test self-isolated? NO_INSTALLCHECK is set in the module because of the issue with caching and the namespace search hooks, but it seems to me that we'd better make the test self-isolated in the long term, like in the attached. Thoughts? -- Michael
diff --git a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out index 39b274b8fa..c28251b6b6 100644 --- a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out +++ b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out @@ -299,3 +299,4 @@ REVOKE ALL PRIVILEGES ON PARAMETER test_oat_hooks.user_var2, test_oat_hooks.super_var2 FROM regress_role_joe; DROP ROLE regress_role_joe; +DROP ROLE regress_test_user; diff --git a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql index 8b6d5373aa..09a38b902a 100644 --- a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql +++ b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql @@ -98,3 +98,4 @@ REVOKE ALL PRIVILEGES ON PARAMETER test_oat_hooks.user_var2, test_oat_hooks.super_var2 FROM regress_role_joe; DROP ROLE regress_role_joe; +DROP ROLE regress_test_user;
signature.asc
Description: PGP signature