| 1 |
# Test locking of role membership grants during concurrent DROP OWNED BY. |
| 2 |
|
| 3 |
setup |
| 4 |
{ |
| 5 |
CREATE ROLE regress_dropowned_role; |
| 6 |
CREATE ROLE regress_dropowned_member; |
| 7 |
CREATE ROLE regress_dropowned_grantor; |
| 8 |
GRANT regress_dropowned_role TO regress_dropowned_grantor |
| 9 |
WITH ADMIN OPTION; |
| 10 |
SET ROLE regress_dropowned_grantor; |
| 11 |
GRANT regress_dropowned_role TO regress_dropowned_member; |
| 12 |
RESET ROLE; |
| 13 |
} |
| 14 |
|
| 15 |
teardown |
| 16 |
{ |
| 17 |
DROP ROLE regress_dropowned_member; |
| 18 |
DROP ROLE regress_dropowned_grantor; |
| 19 |
DROP ROLE regress_dropowned_role; |
| 20 |
} |
| 21 |
|
| 22 |
session s1 |
| 23 |
step s1b { BEGIN; } |
| 24 |
step s1d { DROP OWNED BY regress_dropowned_grantor; } |
| 25 |
step s1c { COMMIT; } |
| 26 |
|
| 27 |
session s2 |
| 28 |
step s2d { DROP OWNED BY regress_dropowned_grantor; } |
| 29 |
|
| 30 |
permutation s1b s1d s2d s1c |