close

Sync Postgres with SQLite

Avoid the complexities of using APIs to move app state over the network. Get super-fast, always-available offline-first/local-first apps.

Postgres
In-app SQLite
Image
Image
Image
See installation steps for these Postgres hosting providers

Add real-time sync to Postgres

PowerSync streams Postgres changes to clients in real-time, so apps can query and mutate local SQLite without waiting on the network.

Sync Streams handle partial syncing under the hood, giving every user just the data they need.
Backend
PowerSync Service
Clients
Postgres
Logical
replication
Sync Streams
ImageImageImage
WebSocket or
HTTP stream
SQLite
SQLite
POSTGRES, meet SQLite

How data syncs from Postgres to in-app SQLite

Image
Privilege-scoped connection

PowerSync connects to your Postgres database over TCP with read access to all synced tables and permissions to consume logical replication slots.

Image
Publication filter

A logical replication publication is created, including the tables referenced in your Sync Streams.

Image
Low maintenance

PowerSync automatically handles most schema change scenarios in Postgres, with no need for client-side migrations.

Postgres
Write-Ahead Log (WAL)
Image
Logical replication
Image
Replication via WAL

PowerSync consumes a logical replication slot to detect row-level INSERT, UPDATE, and DELETE operations in Postgres.

Logical replication messages
Image
Image
Operation history tracked

The PowerSync Service tracks changes to data in the buckets, allowing for efficient delta syncing to clients.

PowerSync Service
Sync Streams
ImageImageImage
Image
Sync Streams for partial sync

You define Sync Streams that control which data is synced to which users. Data is grouped and shared efficiently between users to avoid duplication.

WebSocket or HTTP stream
Image
Image
Authentication using JWTs

Clients authenticate against the PowerSync Service using JWTs.

Image
Real-time sync

The client SDK initially downloads all relevant data and then incrementally keeps it updated, in real time.

Image
Offline-first, including local writes

Writes are immediately applied locally, and queued for upload to your backend API. The PowerSync client SDK automatically handles failures and retries.

PowerSync Client SDK
Image
In-app SQLite
Image
App data tables
Image
Upload queue
Image
Full database on the client-side

On the client, data is persisted to a SQLite database in schemaless format. The application defines a client-side schema which is applied as SQLite views for easy structured querying.

Image
Reactive queries

Live reactive queries can be used to update the UI when data changes.

Image
Strong consistency guarantees

PowerSync uses a server-authoritative architecture with a checkpoint system to guarantee consistency.

Image
Image
Control over the write path

Your backend accepts uploaded writes and then applies them to your Postgres database.

Backend API
Postgres
Write-Ahead Log (WAL)
Image
Logical replication
Logical replication messages
Image
PowerSync Service
Sync Rules
Image
Image
Image
Image
Image
Image
Image
Image
WebSocket or HTTP stream
Image
PowerSync Client SDK
Image
In-app SQLite
Image
App data tables
Image
Upload queue
Image
Backend API
On the server-side
On the client-side
See installation instructions:
Source database setup

Highly scalable and enterprise-ready

Horizontally scalable

Image

AWS VPC Endpoints available in Cloud

Image

Sharded database support

Planned
Image
See pricing

Implement Postgres
& SQLite sync today

Self-hosted PowerSync
Image
Self-host PowerSync