- Memory overcommit allows Linux to grant more address space than physical memory, using physical pages only on first touch; overcommit can trigger the OOM killer when touched pages exceed RAM.
- Postgres is vulnerable to OOM kills because shared memory segments (buffers, WAL, locks) are shared across backends; a SIGKILL can corrupt the segment, forcing the postmaster to restart the entire instance via crash recovery.
- Strict overcommit (vm.overcommit_memory=2) makes the kernel track committed memory and refuse allocations beyond a limit, returning ENOMEM instead of killing a process.
- Postgres handles ENOMEM as a query error: the transaction rolls back, the query fails with 'out of memory', and other connections remain unaffected.