SQLSTATE 53200 FATAL Class 53: Insufficient Resources

out_of_memory could not create shared memory segment — 53200

PostgreSQL error “could not create shared memory segment — 53200” (SQLSTATE 53200): what it means, common causes, and how to fix it.

PG 9.6, 10, 11, 12, 13, 14, 15, 16, 17, 18 Official docs
Last reviewed Jun 2026 Grounded in source

Diagnostic Queries

Symptoms

The server could not create a shared memory segment at startup. PostgreSQL raises SQLSTATE 53200 (out_of_memory) and typically fails to start.

  • Shared memory allocation failed.
  • Common with kernel SHM limits too low.
  • The server cannot start without it.

What the server log shows

FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=..., 03600).

Why PostgreSQL raises this — what the manual says

Section 18.4.1 Shared Memory and Semaphores:

“PostgreSQL requires the operating system to provide inter-process communication (IPC) features, specifically shared memory and semaphores.”

At startup PostgreSQL allocates shared memory for buffers and control structures. If the kernel rejects the request (limits too low or invalid size), the postmaster cannot initialize and reports 53200.

Common causes

  • Kernel shared-memory limits (SHMMAX/SHMALL) too low.
  • shared_buffers set larger than the OS allows.
  • Insufficient huge pages when huge_pages=on is required.

How to fix it

  1. Lower shared_buffers, or raise kernel SHM limits.
  2. Configure huge pages appropriately (or set huge_pages=try).
  3. Consult the OS-specific IPC tuning section of the manual.

Related & next steps

Reference: PostgreSQL 18 Section 19.4 “Managing Kernel Resources”.

Was this helpful?