Lock issues / deadlock during postgres migration
The
CREATE TABLE IF NOT EXISTS drizzle.__drizzle_migrations
command that runs at the start of every drizzle migration creates a lock, and then my ALTER TABLE command inside the migration is unable to obtain the AccessExclusiveLock it requires.
Is there a way to run these in separate transactions? Or is there another approach to get around this?
Attached a pic of the db logs showing the lock, and my migration code. Using postgres-js![No description](https://cdn.answeroverflow.com/1201042668206161991/Logs-lock-beingheld.png)
![No description](https://cdn.answeroverflow.com/1201042668516560966/image.png)
0 Replies