PGCon2011 - Add 4 Video (2015.09.18)

PGCon 2011
The PostgreSQL Conference

Speakers
Jignesh K. Shah
Schedule
Day Talks - 1 - 2011-05-19
Room DMS 1140
Start time 15:00
Duration 01:00
Info
ID 287
Event type Lecture
Track Hacking
Language used for presentation English

Understanding PostgreSQL LWLocks

In this session we take a look at the Light Weight Lock facility in PostgreSQL and the various lwlocks.

PostgreSQL uses Light Weight Locks to manage PostgreSQL Locks. In this session we take

  • Describe the framework of PostgreSQL LWLocks facility -> Architecture of the LWLocks Framework -> Lifecycle of an LWLock using its API -> Understanding Exclusive and Shared modes of lwlock -> Internals of LWLock Wait List -> Ways to monitors the events related to LWLocks

  • Top LWLocks. -> WALInsertLock -> WALWriteLock -> ProcArrayLock -> SInvalReadLock -> CLogControlLock -> DynamicLWLocks

Once you start monitoring LWLocks, you will probably find one of the above locks as highly used or contended. We go a bit further in understanding what this lock means and the corrective actions to take to reduce the stress on the locks.