To warm up, let's talk about lightweight and heavyweight locks (or "regular locks" or just "locks").
I'm using these materials:
- PG docs (first of all, https://www.postgresql.org/docs/current/explicit-locking.html)
- LockManager source code – src/backend/storage/lmgr (and first of all, README https://github.com/postgres/postgres/blob/master/src/backend/storage/lmgr/README)
- Egor Rogov's "PostgreSQL Internals", Part III "Locks"
