Supabaseeduardo_gurgel, riccardo_busettiExplainer
Realtime or Pipelines? How to choose the right tool
Summary
Supabase Realtime and Supabase Pipelines both read PostgreSQL changes through logical replication, but they target different jobs. Realtime delivers live updates and communication to browsers and apps through Broadcast, Presence, and Postgres Changes; its Postgres Changes path checks Row Level Security for subscribed users, uses temporary replication slots, and offers best-effort delivery without replay after disconnects. Pipelines is a managed change-data-capture system that performs an initial sync, then replicates selected publication data in batches to supported analytical destinations through a persistent replication slot, retaining progress and retrying transient failures. The choice depends on the destination and delivery needs: use Realtime for low-latency user experiences that can tolerate gaps, Pipelines for durable analytical copies with at-least-once processing and idempotent destination writes, and both when an application needs both capabilities.
Context
Realtime and Pipelines both consume Postgres changes, but choosing between them for the wrong job can cause missing data, recovery problems, or scalability issues. Realtime is intended for live experiences where human users watch updates, while Pipelines is intended for reliable movement of selected production data into analytical systems.
Approach / What changed
The post compares each product's destination, delivery guarantees, replication-slot behavior, database dependency, processing model, latency, and scale characteristics. It explains Realtime's Broadcast, Presence, and Postgres Changes features, then describes Pipelines' initial sync, persistent CDC replication, batching, retries, WAL-based recovery, and at-least-once semantics, with usage examples for each and for using both together.
Takeaways
Realtime's Postgres Changes feature uses temporary replication slots and does not replay changes missed while clients are disconnected; it is designed for live updates rather than durable replication.
Pipelines performs an initial sync and ongoing batched replication through a persistent slot, resuming from the last acknowledged position while the slot remains valid. Its at-least-once processing requires idempotent destination writes.
Postgres Changes processes changes sequentially and checks Row Level Security for every subscribed client; with 100 subscribers watching a table, one INSERT generates 100 authorization queries.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.