Lesson 9 of 16

Neon: Serverless PostgreSQL, Scale-to-Zero, and Copy-on-Write Branching

Applies to PostgreSQL 13–17 Last reviewed Jun 2026 Grounded in source

The one thing to understand first

Neon takes the disaggregation idea to its logical extreme and makes PostgreSQL serverless. Compute is stateless and can be created, suspended, and destroyed in seconds; all durable state lives in a separate storage service. Two consequences fall out of this design that no traditional managed Postgres can match: scale-to-zero (an idle database costs almost nothing) and instant branching (a full copy-on-write clone of your database in seconds).

Stateless compute

A Neon compute node is a PostgreSQL process with no local durable disk. It holds a cache, processes queries, and streams its WAL to the storage layer. Because it owns no data, it can be paused when idle and resumed on the next connection, and it can be resized without moving data. This is what “serverless” means here: the compute is ephemeral and elastic; the data is elsewhere.

The storage layer: pageservers and safekeepers

Neon’s storage has two roles. Safekeepers durably accept the WAL stream and agree on it using a Paxos-style consensus across multiple nodes/AZs, so an acknowledged commit survives node loss. Pageservers consume that WAL, organize it, and serve data pages to the compute node on demand; they keep recent data locally and offload the bulk to object storage (S3-class), giving effectively “bottomless” capacity. The compute asks the pageserver for a page; the pageserver reconstructs it from the log history.

This is a Pro lesson

Get every Learning Pathway and cookbook recipe — grounded in PostgreSQL source code, with diagnostics, fixes, and prevention for each topic.

Continue this lesson to learn:

  • Branching by copy-on-write
  • How it differs from self-managed PostgreSQL
  • What people miss
  • Key takeaway
  • All 36 Learning Pathway lessons
  • 170+ cookbook recipes
  • Source-grounded diagnostics & fixes

Secure checkout Cancel anytime Source-grounded

Keep going

Related & next steps

Was this helpful?

← Back to 06 — Managed PostgreSQL in the Cloud: Architecture & Trade-offs