Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Logical replication is native Postgres replication that streams row-level changes between a Lakebase database and another Postgres database. Lakebase can act as a subscriber that receives changes from an external publisher, or as a publisher that sends changes to an external subscriber.
Use logical replication to migrate an existing Postgres database into Lakebase, to replicate between Lakebase databases, or to stream changes from Lakebase to an external Postgres database.
Get started
To replicate a single table end to end and see how the pieces fit together, start with the quickstart. It takes a few minutes and does not require an external database.
- Quickstart: Replicate one table between two Lakebase databases. See Quickstart: Replicate between Lakebase databases.
Use cases
| Use case | What it does | Guide |
|---|---|---|
| Migrate a Postgres database into Lakebase | Lakebase subscribes to an external Postgres publisher and copies its data in, then keeps it current until you cut over. | Replicate data into Lakebase |
| Replicate between Lakebase databases | Keep a second Lakebase database in sync for cross-region reads or a version upgrade. | Quickstart: Replicate between Lakebase databases |
| Stream changes to an external Postgres | Lakebase publishes changes to an external Postgres subscriber. | Replicate data from Lakebase |
How logical replication works
A publisher defines a publication, the set of tables whose changes it sends. A subscriber creates a subscription that connects to the publisher, copies the existing data, and then applies each insert, update, and delete as it happens. Which database connects to which determines the network direction:

Logical replication and other data movement methods
Logical replication moves data between Postgres databases. To move Postgres changes into the lakehouse instead, use Lakebase Change Data Feed, which writes changes to a Unity Catalog managed Delta table. For a full comparison of the ways to move data in and out of Lakebase, see Move data in and out of Lakebase.
Limitations
- Logical replication is available on AWS and Azure.
- Logical replication runs over public networking. Private Link is not supported for either direction. The subscriber connection is governed by the account network policy's allowed internet destinations, and the publisher connection is governed by the workspace IP access list.
- Replication runs on the primary compute, not on read replicas.
- Logical replication copies data, not schema. Create target tables before you start replication. Later schema changes are not replicated.
- Foreign tables are not replicated.
Next steps
- Get started fast: Replicate one table between two Lakebase databases. See Quickstart: Replicate between Lakebase databases.
- Migrate into Lakebase: Replicate an existing Postgres database into Lakebase. See Replicate data into Lakebase.
- Compare methods: Choose the right way to move data in and out of Lakebase. See Move data in and out of Lakebase.