When I have a function and set a pg_advisory_lock(key bigint) the test passes without problems. But when I use the second form with two integers, the execution of the test gets blocked and waits till I cancel the test execution.
create function foo() RETURNS boolean AS $$
BEGIN
PERFORM pg_advisory_lock(1, 1);
PERFORM pg_advisory_unlock(1, 1);
RETURN true;
END;
$$ LANGUAGE plpgsql;
BEGIN;
SELECT plan(1);
select is(foo(), true);
SELECT * FROM finish();
ROLLBACK;
It also does not work when the bigint is 2e10::bigint + 1.