recovery mode PostgreSQL Origin: Data Last updated 13 Oct 2026

FATAL: the database system is in recovery mode

PostgreSQL crashed (often OOM-killed) and is replaying WAL to recover.

Exact message you may see the database system is in recovery modeterminated by signal 9: Killed
Seen on: PostgreSQL

Meaning

When a backend process dies abnormally, the postmaster restarts all sessions and runs recovery. The PostgreSQL log shows which process was killed and why.

Common causes

  • A backend killed by the OOM killer
  • Server crash/power loss
  • Storage errors

⚡ Quick fix

  1. Check the PostgreSQL log and dmesg for OOM kills
  2. Reduce work_mem/max_connections or add RAM
  3. Let recovery finish

Detailed fix by platform

Linux

  1. dmesg -T | grep -i -E 'killed process|out of memory'

How to diagnose

  1. Cause — What terminated the backend?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

0xC0000005 — The application was unable to start correctly (0xc0000005) / Exception code 0xc0000005 access violation (Windows)0xC00000050xC0000142 — The application was unable to start correctly (0xc0000142) (Windows)0xC0000142Cannot allocate memory — fork: Cannot allocate memory / ENOMEM (Linux)Cannot allocate memorydouble free or corruption — C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped) (C/C++)double free or corrup…EXC_BAD_ACCESS — Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) (iOS)EXC_BAD_ACCESSGradle Java heap space — Gradle: Expiring Daemon because JVM heap space is exhausted / java.lang.OutOfMemoryError: Java heap space during build (Android)Gradle Java heap spaceheap out of memory — FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (Node.js)heap out of memoryIllegal instruction — Illegal instruction (core dumped) (SIGILL) (Linux)Illegal instructionrecovery …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.