WAL & recovery

Resource manager (rmgr)

Also called: rmgr, RmgrTable entry, WAL resource manager

A resource manager is a subsystem that knows how to write and replay its own kind of WAL record. Heap, B-tree, transaction commit, sequences, and more each register one in the RmgrTable, providing callbacks, most importantly a redo function used during recovery and a desc function used to print the record. Each WAL record's header carries an xl_rmid that routes it to the correct manager.

What this means

WAL carries many kinds of change (heap edits, B-tree edits, commits, sequences), and each kind registers a resource manager that knows how to write and, crucially, replay its own records during recovery. Every WAL record carries an id that routes it to the right manager, like a sorting office sending each letter to the correct department.

Why it matters operationally

This modular design is why recovery is reliable and extensible: there is no single monolithic replay routine. When you read pg_waldump or pg_walinspect output, the resource-manager column tells you which subsystem produced each record, invaluable for finding what is generating your WAL volume.

← All glossary terms · GUC reference · Error catalog