Resource Owners

PostgreSQL's ResourceOwner infrastructure — `src/backend/utils/resowner/resowner.c` — the tree of resource-tracking objects that release buffer pins, catcache refs, tuple descriptors, snapshots, plancache refs, DSM segments etc. automatically on transaction/subtransaction/portal boundaries. Loads when the user asks about `CurrentResourceOwner`, `ResourceOwnerCreate`/`ResourceOwnerRelease`, why a subtransaction cleanup didn't free a resource, the callback-based extension API (PG 17+), adding a new resource kind, or debugging "resource owner leak" WARNINGs. Skip when the ask is about MemoryContexts (parallel infrastructure but different lifecycle — see `memory-contexts`) or about locks (separate — `locking`).

matejformanek 4cddd92 8.7 KB Updated

File contents

matejformanek/postgres-claude/tree/main/.claude/skills/resource-owners commit 4cddd92484

Frequently asked questions

npx skillmds@latest add matejformanek/resource-owners