Locks consist of lightweight locks (known as lwlocks) and other locks. After heavy lock contention occurs, analyze the issue based on the actual situation.

  • lwlock: The wait_event field specifies the wait event type. lwlock is one of the values of this field. The lwlock details are provided in the "Wait events" topic. For more information about lwlocks, see lwlock and .
  • lock
    • The wait_object field in the polar_stat_activity view specifies the process that holds the lock.
    • You can also analyze locks in the pg_locks view.