mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Drop global objects after completed test
Project policy is to not leave global objects behind after a regress
test run. This was found as a result of the development of a patch
to make pg_regress detect such leftovers automatically, which in the
end was withdrawn due to issues with parallel runs.
This was originally committed as 936e3fa378
, but the issue also exists
in the 12~16 range.
Discussion: https://postgr.es/m/E1phvk7-000VAH-7k@gemulon.postgresql.org
Backpatch-through: 12
This commit is contained in:
committed by
Michael Paquier
parent
cf9f6b4688
commit
988ddbef97
@ -91,6 +91,8 @@ 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 RESTRICT;
|
||||
DROP ROLE regress_dump_test_role;
|
||||
DROP EXTENSION test_pg_dump;
|
||||
-- shouldn't be anything left in pg_init_privs
|
||||
SELECT * FROM pg_init_privs WHERE privtype = 'e';
|
||||
|
@ -107,6 +107,10 @@ 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 RESTRICT;
|
||||
|
||||
DROP ROLE regress_dump_test_role;
|
||||
|
||||
DROP EXTENSION test_pg_dump;
|
||||
|
||||
-- shouldn't be anything left in pg_init_privs
|
||||
|
Reference in New Issue
Block a user