Skip to content

Postgres Sync

Sync from your database into your apps. For partial replication, data delivery and fan-out.

Electric 1.0 release

Electric is now 1.0! See the release post here.

Electric sync engine

The Electric sync engine syncs little subsets of data out of Postgres into local apps and services — wherever you need the data.

Use cases diagram

You can sync data into:

  • web and mobile apps, replacing data fetching with data sync
  • edge workers and services, for example maintaining a low-latency edge data cache
  • local AI systems, for example running RAG using pgvector
  • dev and test environments, for example syncing data into an embedded PGlite database

How does it work?

The Electric sync engine is an Elixir application, developed at packages/sync-service.

It connects to your Postgres using a DATABASE_URL, consumes the logical replication stream and fans out data into Shapes, which Clients then consume and sync.

Shape log flow diagram
Shape log flow diagram.

This enables a massive number of clients to query and get real-time updates to subsets of the database. In this way, Electric turns Postgres into a real-time database.

More information

See how you can combine Postgres Sync with other Electric products to build fast, reactive apps.

See the Docs, Quickstart and Demos. You can self-host or use the Electric Cloud.