Skip to content

Commit 5500285

Browse files
does locking fix it?
1 parent c270f6b commit 5500285

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/pgt_test_utils/testdb_migrations/0001_setup-roles.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
do $$
22
begin
33

4+
select pg_advisory_lock(12345);
5+
46
if not exists (
57
select from pg_catalog.pg_roles
68
where rolname = 'admin'
@@ -22,5 +24,7 @@ if not exists (
2224
create role test_nologin;
2325
end if;
2426

27+
select pg_advisory_unlock(12345);
28+
2529
end
2630
$$;

0 commit comments

Comments
 (0)