relation
Short Description
Waiting to acquire a lock on a relation.
Detailed Description​
Relation locks are commonly used to protect rows being used by INSERT/UPDATE/DELETE transactions.
How to reduce this wait​
The PostgreSQL Wiki page - Lock Monitoring can help diagnose locking issues.
Issues can be caused by application design problems.
Poor database performance where locks are not freed as quickly as expected and the number of locks builds unexpectedly.
Additional Links​
PostgreSQL Docs - Wait Events of Type Lock
PostgreSQL Wiki - Lock Monitoring
Search online​
If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.