Pick a PostgreSQL backend lock primitive (atomic / spinlock / LWLock / heavyweight / predicate / buffer-pin-content) or debug a lock-ordering bug, silent LWLock hang, deadlock-detector report, or a multixact / tuple-lock interaction — the six-layer PG lock taxonomy in operational form. Covers pgatomicu32 / u64 ordering + memory barriers, SpinLockAcquire / SpinLockRelease (with the "no calls / no ereport / no CHECKFORINTERRUPTS" rules), LWLockAcquire LWSHARED / LWEXCLUSIVE and tranches (lwlocklist.h + waiteventnames.txt), heavyweight LockAcquire / LockRelationOid / LOCKTAG, predicate (SSI) locks, buffer pin / content locks, the BufferMapping / LockManager / PredicateLockManager partition rank rules, multi-XID HEAPXMAXISMULTI interaction with FOR UPDATE / FOR KEY SHARE, parallel-worker lock-group semantics, and the lldb-attach recipe for silent-LWLock-deadlock diagnosis. Use this skill proactively whenever the user is writing or reviewing C in src/backend or dev/src/backend that touches shared memory (MainLWLockArray, PGPROC, ProcArray, BufferDesc, SLRU, any Shmem allocation), adds a new LWLock tranche (RequestNamedLWLockTranche / LWLockNewTrancheId / PGLWLOCK / PGLWLOCKTRANCHE), picks between spinlock / LWLock / atomic / heavyweight for new shmem state, asks about LWLock partition rank order, debugs an LWLock hang where pgstatactivity shows waiteventtype='LWLock' but no deadlock detected ever fires, hits an assertion like IsRelationExtensionLockHeld, gets bitten by HEAPXMAXISMULTI and GetMultiXactIdMembers, asks about parallel-worker lock-group conflicts, or reviews a patch that adds shmem state / new wait events — even when the user doesn't use the literal word "lock". Skip for pthreadmutext / std::mutex / Java synchronized / ReentrantLock / Go sync.Mutex / Rust std::sync::Mutex / parkinglot / tokio::sync::Mutex / C lock(obj) / Monitor.Enter, Redis pessimistic / Redlock / ZooKeeper / etcd / Chubby distributed locks, ORM optimistic locking (version int column), user-level / application-side SELECT FOR UPDATE design questions (how to model inventory claim), application-level lock-manager design (key→holder hash with TTLs), and general "what's the right lock primitive" non-PG advice.
Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI
Supported by the Atlas install prompt. Skill-specific requirements vary.
Skill stats
Skills1CategoryEngineeringStars0
About this skill
Pick a PostgreSQL backend lock primitive (atomic / spinlock / LWLock / heavyweight / predicate / buffer-pin-content) or debug a lock-ordering bug, silent LWLock hang, deadlock-detector report, or a multixact / tuple-lock interaction — the six-layer PG lock taxonomy in operational form. Covers pgatomicu32 / u64 ordering + memory barriers, SpinLockAcquire / SpinLockRelease (with the "no calls / no ereport / no CHECKFORINTERRUPTS" rules), LWLockAcquire LWSHARED / LWEXCLUSIVE and tranches (lwlocklist.h + waiteventnames.txt), heavyweight LockAcquire / LockRelationOid / LOCKTAG, predicate (SSI) locks, buffer pin / content locks, the BufferMapping / LockManager / PredicateLockManager partition rank rules, multi-XID HEAPXMAXISMULTI interaction with FOR UPDATE / FOR KEY SHARE, parallel-worker lock-group semantics, and the lldb-attach recipe for silent-LWLock-deadlock diagnosis. Use this skill proactively whenever the user is writing or reviewing C in src/backend or dev/src/backend that touches shared memory (MainLWLockArray, PGPROC, ProcArray, BufferDesc, SLRU, any Shmem allocation), adds a new LWLock tranche (RequestNamedLWLockTranche / LWLockNewTrancheId / PGLWLOCK / PGLWLOCKTRANCHE), picks between spinlock / LWLock / atomic / heavyweight for new shmem state, asks about LWLock partition rank order, debugs an LWLock hang where pgstatactivity shows waiteventtype='LWLock' but no deadlock detected ever fires, hits an assertion like IsRelationExtensionLockHeld, gets bitten by HEAPXMAXISMULTI and GetMultiXactIdMembers, asks about parallel-worker lock-group conflicts, or reviews a patch that adds shmem state / new wait events — even when the user doesn't use the literal word "lock". Skip for pthreadmutext / std::mutex / Java synchronized / ReentrantLock / Go sync.Mutex / Rust std::sync::Mutex / parkinglot / tokio::sync::Mutex / C lock(obj) / Monitor.Enter, Redis pessimistic / Redlock / ZooKeeper / etcd / Chubby distributed locks, ORM optimistic locking (version int column), user-level / application-side SELECT FOR UPDATE design questions (how to model inventory claim), application-level lock-manager design (key→holder hash with TTLs), and general "what's the right lock primitive" non-PG advice.
Quick start
Copy the install prompt. Use the green button above this README.
Send it to your agent. Paste it into your coding agent’s chat and send.
Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Pick a PostgreSQL backend lock primitive (atomic / spinlock / LWLock / heavyweight / predicate / buffer-pin-content) or debug a lock-ordering bug, silent LWLock hang, deadlock-detector report, or a multixact / tuple-lock interaction — the six-layer PG lock taxonomy in operational form. Covers `pg_atomic_u32 / u64` ordering + memory barriers, `SpinLockAcquire / SpinLockRelease` (with the "no calls / no ereport / no CHECK_FOR_INTERRUPTS" rules), `LWLockAcquire LW_SHARED / LW_EXCLUSIVE` and tranches (lwlocklist.h + wait_event_names.txt), heavyweight `LockAcquire` / `LockRelationOid` / `LOCKTAG_*`, predicate (SSI) locks, buffer pin / content locks, the `BufferMapping / LockManager / PredicateLockManager` partition rank rules, multi-XID `HEAP_XMAX_IS_MULTI` interaction with `FOR UPDATE / FOR KEY SHARE`, parallel-worker lock-group semantics, and the lldb-attach recipe for silent-LWLock-deadlock diagnosis. **Use this skill proactively whenever the user is writing or reviewing C in `src/backend` or `dev/src/backend` that touches shared memory (MainLWLockArray, PGPROC, ProcArray, BufferDesc, SLRU, any `*Shmem*` allocation), adds a new LWLock tranche (RequestNamedLWLockTranche / LWLockNewTrancheId / PG_LWLOCK / PG_LWLOCKTRANCHE), picks between spinlock / LWLock / atomic / heavyweight for new shmem state, asks about LWLock partition rank order, debugs an LWLock hang where `pg_stat_activity` shows `wait_event_type='LWLock'` but no `deadlock detected` ever fires, hits an assertion like `IsRelationExtensionLockHeld`, gets bitten by `HEAP_XMAX_IS_MULTI` and GetMultiXactIdMembers, asks about parallel-worker lock-group conflicts, or reviews a patch that adds shmem state / new wait events — even when the user doesn't use the literal word "lock".** Skip for pthread_mutex_t / std::mutex / Java synchronized / ReentrantLock / Go sync.Mutex / Rust std::sync::Mutex / parking_lot / tokio::sync::Mutex / C# lock(obj) / Monitor.Enter, Redis pessimistic / Redlock / ZooKeeper / etcd / Chubby distributed locks, ORM optimistic locking (version int column), user-level / application-side `SELECT FOR UPDATE` design questions (how to model inventory claim), application-level lock-manager design (key→holder hash with TTLs), and general "what's the right lock primitive" non-PG advice.
About this listing
Category
Engineering
Reported license
PostgreSQL
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.