---
title: "More load is faster: Tuning Postgres read replicas"
description: "Postgres read replicas fed from archived WAL (rather than streaming replication) show a U-shaped lag curve: idle systems wait up to archive_timeout (60s) for a 16MB segment to fill, while very high write rates make archive upload fall behind."
url: "https://swe.quest/articles/more-load-is-faster-tuning-postgres-read-replicas-edfe2bbdc0de0a5f"
canonical: "https://clickhouse.com/blog/tuning-postgres-read-replicas"
source: "ClickHouse"
published: "2026-11-17"
difficulty: "hard"
kind: "Research"
reading_minutes: 9
tags: ["postgres","replication","performance"]
---

# More load is faster: Tuning Postgres read replicas

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-11-17, 9 min read, Research. Original: [https://clickhouse.com/blog/tuning-postgres-read-replicas](https://clickhouse.com/blog/tuning-postgres-read-replicas)

## Summary

Postgres read replicas fed from archived WAL (rather than streaming replication) show a U-shaped lag curve: idle systems wait up to archive\_timeout (60s) for a 16MB segment to fill, while very high write rates make archive upload fall behind. Moderate load gives about 3s lag by default. Setting archive\_timeout=5s and wal\_retrieve\_retry\_interval=500ms is a safe starting point. More aggressive options give diminishing returns because each poll costs about 0.8s of WAL-G calls, re-fetching and decompressing the previous segment, and adds cross-AZ network cost with synchronous HA. These options include sub-second pg\_switch\_wal() loops and a persistent WAL-G daemon client. Streaming replication still wins on lag but brings VACUUM, slot and failover hazards.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- Postgres WAL and archiving ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Postgres replication basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- WAL-G or backup tooling ([easy posts on Developer tools](https://swe.quest/tags/developer-tools.md?difficulty=easy))

## Keywords

PostgreSQL, WAL-G, archive\_timeout, wal\_retrieve\_retry\_interval, pg\_switch\_wal, pgbench, hot\_standby\_feedback, ClickHouse Managed Postgres

## Related posts

- [Introducing Read Replicas](https://swe.quest/articles/introducing-read-replicas-3301ec5316ccd33a.md): Supabase · 2023-12-15 · Medium · 6 min read · PostgreSQL, Replication, Scaling
  Supabase now supports Postgres read replicas in 12 regions, up to two per project, for offloading reads and analytics, serving data closer to users, and redundancy.
- [Don't add a read replica until you've read this](https://swe.quest/articles/don-t-add-a-read-replica-until-you-ve-read-this-a990a2b0dc14e87b.md): incident.io · 2026-07-21 · Medium · 18 min read · PostgreSQL, Replication, Consistency models, Go, Scaling
  incident.io moved nearly all Postgres read traffic to a read replica and had to preserve read-after-write consistency without hand-routing each query.
- [PostgresBench: Measuring the impact of High Availability on Managed Postgres performance](https://swe.quest/articles/postgresbench-measuring-the-impact-of-high-availability-on-managed-postgres-f5f54e9ac5894971.md): ClickHouse · 2026-07-21 · Medium · 7 min read · PostgreSQL, Replication, Performance engineering, Cloud platforms
  PostgresBench now measures the performance cost of high-availability configurations across managed Postgres services, comparing shared-nothing designs (ClickHouse Managed Postgres, RDS, Crunchy Bridge) that use streaming standbys with shared-storage forks (Aurora, Neon) that replicate WAL to a storage layer.
- [What I learned from a month with WalShadow on ClickHouse Managed Postgres](https://swe.quest/articles/what-i-learned-from-a-month-with-walshadow-on-clickhouse-managed-postgres-89e5a8963b72573d.md): ClickHouse · 2026-11-06 · Medium · 16 min read · PostgreSQL, Replication, Event-driven architecture, Analytics & OLAP, Performance engineering
  WalShadow, which decodes physical Postgres WAL outside the database and writes blocks directly to ClickHouse, held median replication latency near 0.4 s from 1 to 200,000 rows/s on a 16 vCPU source.
- [Rethinking read replicas for the lakebase architecture](https://swe.quest/articles/rethinking-read-replicas-for-the-lakebase-architecture-35eaea5162536008.md): Neon · 2026-11-25 · Medium · 15 min read · PostgreSQL, Replication, Storage engines, Cloud platforms, Cost optimization
  Lakebase Postgres implements read replicas as additional read-only computes attached to the same disaggregated storage as the primary, rather than as physical clones with their own volumes.

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)
