Skip to main content

What it flags

LOCK TABLE requests ACCESS EXCLUSIVE on an existing PostgreSQL table. Omitting the mode also requests this lock. Once acquired, it blocks reads and writes until the transaction releases it. PostgreSQL LOCK documentation

How to review or fix

Check what the migration needs to protect. Use a weaker mode if it provides the required protection, or schedule the operation and minimize the work performed while holding the lock.