How Socialpruf built a faster, more reliable data stack by replacing Neon with Postgres managed by ClickHouse
Socialpruf, a social analytics platform ingesting hundreds of posts per second, moved customer-facing dashboard queries from Postgres to ClickHouse via CDC, cutting multi-second load times to millisecond aggregations. It later migrated its 0.5 TB Postgres from Neon to Postgres managed by ClickHouse. The drivers were Neon connection dropouts and cross-service network transfer charges exceeding half of compute cost. After a failed logical-replication attempt, PeerDB mirrored the data in hours and was validated for a week before cutover, and PgBouncer absorbed thousands of connections that exceeded max_connections. Reported results are about 30% faster Postgres queries overall (up to 5x on some) and no connectivity issues since the switch.
Related posts
- How Shipsidekick replaced Neon with ClickHouse Managed Postgres for 10x faster queries and better reliability
ClickHouse mediumAdept
Shipsidekick, a logistics platform built on Next.js and Vercel, moved its Postgres database from Neon to ClickHouse Managed Postgres after repeated outages. The failures came from connection pool exhaustion across Prisma, Vercel Fluid compute and Neon's PgBouncer, at around 3,000 connections. ClickPipes logical replication moved 500 GB in 4-5 hours. One snag was a partial unique index tripped by mid-flight transactions, fixed by dropping the index and re-creating it after replication. With the bundled PgBouncer, NVMe storage and a single async standby, CPU fell from 100% to 5-10%, cache hit rate rose from 30-35% to 99%, and queries ran about 10x faster. AI agents querying the primary caused CPU spikes, which the team handled with statement timeouts and later a dedicated read replica.
- How we migrated Clera’s 500 GB production database to ClickHouse Managed Postgres overnight
ClickHouse mediumAdept
Clera moved a 500 GB, 500+ table production Postgres database from the EU to the US overnight onto ClickHouse Managed Postgres, with production traffic still running, using two parallel ClickPipes pipelines. The vendor choice followed a replay of their real workload (hot reads, point lookups, background analytics) on Supabase, Neon, PlanetScale and ClickHouse, plus sysbench TPC-C at 8–128 threads. Local NVMe storage beat network-attached storage, with 16–42% higher TPS than PlanetScale out of the box, and CPU fell from days at 100% to 10–20%. The hard parts were extension portability, restoring triggers, rebuilding indexes, resequencing tables, and doing parity checks before cutover.
- How Infinitas Learning uses ClickHouse Managed Postgres to process billions of events for 1.6M unique learners
ClickHouse mediumAdept
Infinitas Learning runs transactional learner-result processing on Postgres, with PL/pgSQL functions serving as the API in place of an earlier Kafka/Flink event-sourced pipeline, and customer-facing analytics on ClickHouse. Migrating Postgres from Neon to ClickHouse Managed Postgres took two days: 750 GB copied in 16 hours and a zero-downtime cutover via logical replication. P50 fell to double-digit microseconds. On the analytics side, tail latency spikes of up to 13 s came from cache misses on a high-cardinality UUID primary key combined with continuous inserts. The team self-hosted ClickHouse, returned to Cloud after merge and read tuning with support, and then used distributed cache prewarming to bring P99 to 410 ms against a 500 ms SLA.
- Vantage's Journey from Redshift and Postgres to ClickHouse
ClickHouse easyNovice
Vantage, a cloud cost platform handling billions of billing records, outgrew Postgres when constant deletes and reinserts kept vacuum running and pushed indexes out of memory. Redshift, tried next with Postgres as a cache, struggled with updates, needed data inserted in sort order, required expensive vacuum sort jobs, and forced billions of rows to be copied daily between the two systems. A 60-day migration to ClickHouse Cloud replaced the delete-and-reinsert pattern with ReplacingMergeTree and an incrementing import-version column, letting background merges handle updates. The result was double the resources at roughly Redshift's price, with query performance comparable to well-indexed pre-aggregated Postgres tables.
- OLTP is expensive, you can ClickHouse it.
ClickHouse easyNovice
Data that has stopped changing doesn't need Postgres's ACID machinery, so it can be offloaded to ClickHouse for roughly an order of magnitude better unit economics. Postgres pays for durability, MVCC isolation and synchronous index maintenance on every write: a ~100-byte change touches several 8 KB pages and tens of KB of WAL. It also stores data in uncompressed row pages that thrash the cache once data outgrows RAM. The proposed pattern keeps writes and fresh-row reads in Postgres and replicates settled data to ClickHouse via CDC to serve reads and aggregations, with claimed 10–30× compression and ~100× cheaper aggregations. The cost is slower single-row reads and about a second of eventual consistency. ClickHouse Cloud features (NVMe Postgres, WalShadow CDC, the pg_clickhouse FDW) are pitched as the way to implement it.