Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 7 min read Research mediumAdept

PostgresBench: Measuring the impact of High Availability on Managed Postgres performance

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. On a 16 vCPU/64 GB instance with a 500 GB dataset, ClickHouse's NVMe-backed service dropped to 94% of single-node TPS with one async standby and 79% with two synchronous quorum standbys, with p99 latency rising 1.8x and 2.5x. RDS throughput was roughly flat, but its p99 rose to 1.7x with one sync standby and 6.3x (817 ms) with a two-standby quorum cluster. The vendor-run results claim 2-4x throughput advantages for ClickHouse over the other services at matched compute and comparable durability.

Related posts

  • PostgresBench: A Reproducible Benchmark for Postgres Services

    ClickHouse mediumAdept

    PostgresBench is an open, reproducible benchmark for managed Postgres services built on pgbench's TPC-B-like workload (256 clients, 16 threads, 10-minute runs, three runs each) at ~100 GB and ~500 GB scale factors, with default configs, HA disabled and all services in us-east-2. In the first cohort, ClickHouse's NVMe-backed managed Postgres reached about 28.7K TPS on 16 vCPU/64 GB at 100 GB, versus 14.8K for Crunchy Bridge, 12.6K for Aurora, 8.6K for Neon and 8.1K for RDS, and held about 26K TPS at 500 GB. ClickHouse attributes the lead to co-located local NVMe storage, which avoids network round trips on every fsync and WAL commit in write-heavy workloads. Scripts and raw JSON results are on GitHub for verification and community submissions, though the vendor-run setup and absence of pricing comparisons are worth weighing.

  • Benchmarking NVMe-backed Managed Postgres: PlanetScale and ClickHouse

    ClickHouse mediumAdept

    On identical AWS r8gd instances with local NVMe and quorum synchronous replication, ClickHouse Managed Postgres outperformed PlanetScale Metal in a pgbench TPC-B-like workload. Throughput was 34% higher at 4 vCPU and 51–54% higher at 16 vCPU on 100 GB and 500 GB datasets, with lower average latency. The gap is attributed to configuration rather than hardware: 2 MB huge pages (about 12% on their own), lz4 WAL compression, and max_wal_size sized to the instance (up to 256 GB) versus PlanetScale's 8 GB with huge pages and WAL compression disabled. The results come from a vendor benchmark, and the authors advise validating with your own workload.

  • Building an enterprise Postgres service in ClickHouse Cloud

    ClickHouse easyNovice

    ClickHouse Cloud's managed Postgres runs on NVMe with up to two cross-AZ synchronous standbys using quorum commit (acknowledged when one standby confirms) and automatic failover. Standbys are deliberately kept off read traffic so WAL replay lag and VACUUM interference don't delay failover; separate read replicas handle read scaling. Other features include failover-safe logical replication slots that keep ClickPipes/PeerDB CDC into ClickHouse running across failovers without full resyncs, WAL-G daemon-based continuous archiving for 7-day PITR and forks, and per-cluster dedicated VPCs with TLS, AES-256 at rest and Private Link. Planned work includes GCP support, near-sub-second CDC v2, Query Performance Insights and Terraform support.

  • Postgres on NVMe: performance and the convergence of transactions and analytics

    ClickHouse mediumAdept

    Running Postgres on local NVMe instead of gp3 EBS gave 9.2× more throughput (16,030 vs 1,734 TPS) and UPDATE latency of 4.0 ms vs 36.9 ms in a pgbench benchmark with a 482 GiB dataset about 30× larger than RAM. Profiling showed EBS backends spending 89% of wall time blocked on I/O. VACUUM ran 2.6× faster on NVMe, while logical decoding gained only 1.7× because it is single-threaded. To offset NVMe's ephemerality, durability moves into Postgres via quorum synchronous replication across AZs plus continuous WAL archival to S3 with WAL-G. Analytics still needs a columnar engine, so the recommended pattern is CDC (PeerDB, or the new WalShadow) into ClickHouse, queried through the pg_clickhouse extension.

  • Production Postgres on Railway: From First Deploy to High Availability

    Railway mediumAdept

    Railway Postgres can grow from a single private-networked database to a production setup with volume backups, point-in-time recovery, PgBouncer connection pooling and Patroni-based high availability, demonstrated with an orders API that uses idempotency keys so retries stay safe. PITR restores into a separate service for validation, and the guide stresses measuring RPO/RTO end to end, including validation and reconnection time. Transaction pooling breaks session settings, LISTEN, advisory locks and named prepared statements, so migrations should use an unpooled URL. In one small planned switchover test (primary, two replicas, etcd, HAProxy), writes were interrupted for about 17 seconds. That is a single observation, not a guaranteed failover time.

The quest for software engineering knowledge.

Look:
Layout: