FlywayException: Number of retries exceeded while attempting to acquire PostgreSQL advisory lock
There are some script about advisory:
----this will try to obtain the lock. If the lock is successfully obtained, Postgres will return 't', otherwise 'f' if you failed you obtain the lock,will not wait until it can obtain the lock, it will return immediately with 't' or 'f'.
SELECT pg_try_advisory_lock(1);
---- This will release one lock reference for the id n.
SELECT pg_advisory_unlock(1)
----this will unlock all advisory locks currently held by you in your session
SELECT pg_advisory_unlock_all();