Title

Question

What should I do when I face a timeout error while running `prisma migrate div` with a context of postgres advisory lock (SELECT pg_advisory_lock(72707369))?

Answer

If you face a timeout error with a context of postgres advisory lock (SELECT pg_advisory_lock(72707369)), try running it again. If the error persists, it's just a warning. Make sure that the current rows consisting of `idReferral` already contain a unique value. If you apply a unique constraint, you might get a warning saying that the migration will fail if there are existing duplicate values.

a

Arun Kumar

07/13/2021, 11:52 AM
I'm facing this error when trying to run
prisma migrate div
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See 
<https://pris.ly/d/migrate-advisory-locking> for details.
n

Nick

07/13/2021, 11:53 AM
Try running it again
a

Arun Kumar

07/13/2021, 12:02 PM
tried multiple times
Okay. Now I'm getting this warning if I apply unique constraint.
• A unique constraint covering the columns `[idReferral]` on the table MyTable will be added. If there are existing duplicate values, this will fail.
n

Nick

07/13/2021, 12:13 PM
Yeah it’s just a warning. Make sure that current rows consisting of
idReferral
already contain a unique value.
Else you won’t be able to apply the migration.