---
title: "What you get when you think of Postgres storage as a transaction journal"
description: "Neon treats Postgres storage as a transaction journal: the write-ahead log becomes the source of truth instead of a recovery aid."
url: "https://swe.quest/articles/what-you-get-when-you-think-of-postgres-storage-as-a-transaction-journal-a74912c90f281399"
canonical: "https://neon.com/blog/what-you-get-when-you-think-of-postgres-storage-as-a-transaction-journal"
source: "Neon"
published: "2024-05-01"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 9
tags: ["postgres","storage-engines","replication","distributed-databases"]
---

# What you get when you think of Postgres storage as a transaction journal

A post on [Neon](https://swe.quest/sources/neon.md), published 2024-05-01, 9 min read, Deep dive. Original: [https://neon.com/blog/what-you-get-when-you-think-of-postgres-storage-as-a-transaction-journal](https://neon.com/blog/what-you-get-when-you-think-of-postgres-storage-as-a-transaction-journal)

## Summary

Neon treats Postgres storage as a transaction journal: the write-ahead log becomes the source of truth instead of a recovery aid. WAL is streamed to Safekeepers, which make it durable through Paxos-like consensus, and Pageservers turn it into page versions stored in S3, so compute nodes can stay stateless. Because any page can be rebuilt at any LSN, branching is copy-on-write via a pointer to an LSN, point-in-time restore is a specialized branch, read replicas share the Pageserver instead of copying data, and time-travel queries are possible. A walkthrough of WAL segment naming and pg\_waldump output shows the underlying records.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Distributed databases](https://swe.quest/tags/distributed-databases.md) (Data & databases)

## Prerequisites

- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- write-ahead logging ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- copy-on-write

## Keywords

Neon, Postgres WAL, pg\_waldump, Safekeepers, Pageservers, LSN, S3

## Related posts

- [WAL + S3: Lakebase storage for the era of agents](https://swe.quest/articles/wal-s3-lakebase-storage-for-the-era-of-agents-3f04922da0e40ff3.md): Neon · 2026-08-24 · Hard · 15 min read · PostgreSQL, Storage engines, Storage systems, Data structures, Replication
  Lakebase Postgres (Neon's architecture) treats the Postgres write-ahead log as the source of truth and data pages as a derived cache, splitting the system into stateless compute running unmodified Postgres and a storage layer of Paxos-replicated safekeepers, pageservers, and S3.
- [Deep dive into Neon storage engine](https://swe.quest/articles/deep-dive-into-neon-storage-engine-efc0ffc53406f34d.md): Neon · 2023-03-30 · Hard · 7 min read · Storage engines, PostgreSQL, Distributed databases, Serverless, Replication
  Neon's storage engine separates Postgres compute from storage and serves pages through GetPage@LSN, reconstructing any page as of any log sequence number from immutable layer files.
- [Architecture decisions in Neon](https://swe.quest/articles/architecture-decisions-in-neon-01182afd96537274.md): Neon · 2022-07-08 · Medium · 9 min read · PostgreSQL, Storage engines, System design, Serverless, Replication
  Neon built serverless Postgres by separating storage from compute without forking Postgres.
- [Point In Time Recovery Under the Hood in Serverless Postgres](https://swe.quest/articles/point-in-time-recovery-under-the-hood-in-serverless-postgres-81b0a26592d229ce.md): Neon · 2024-02-22 · Medium · 7 min read · PostgreSQL, Storage engines, Serverless, Replication
  Neon implements point-in-time recovery by treating Postgres as its WAL.
- [A Deep Dive Into Neon’s Instant PITR](https://swe.quest/articles/a-deep-dive-into-neon-s-instant-pitr-6efa2ca3d55740a4.md): Neon · 2025-03-26 · Medium · 6 min read · PostgreSQL, Storage engines, Databases
  Neon's point-in-time restore is instant because its storage is copy-on-write: compute nodes stream WAL to Paxos-replicated safekeepers, and pageservers reconstruct any page at any past LSN from image and delta layers kept in object storage.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
