Deploying PeerDB
We currently support deploying and testing PeerDB using our Docker Compose file.Docker can be installed by referring to these instructions.
The
docker compose
tool should also be present. The Postgres client tools (specifically
psql
) are used to test the PeerDB installation.Quickstart
The following steps assume you have PeerDB running locally. We also need
psql
installed and available on your
PATH.Setup
This script reuses the PeerDB internal Postgres instance to setup two databases, which we can use to create two peers. It also creates some tables on both databases to use later in the quickstart. Run the following commands in your terminal:Creating Peers
With PeerDB running, we can create our first peers. Head over tolocalhost:3000
on your browser. This is the PeerDB Dashboard.
Clicking on Peers in the sidebar will take us to the Peers page.
Let’s click on the Create Peer button at the top right to get started.


postgres
.

postgres
.


Real-time CDC
To kick off Change Data Capture (CDC) based streaming from source peer to target peer, let’s click on New Mirror.
CDC
box, and enter the name of the mirror and the two peers.


public.test
.
Now that we’ve filled in all the mirror details.
Let’s click on Validate to check if everything is set up correctly, much like we did when creating peers!


Mirrors
page which we landed on after creating the mirror:


INSERT
, UPDATE
, DELETE
) from source to target.
FAQ
If you have any questions about the PeerDB setup and deployment process, don’t hesitate to reach out on Slack. We’re more than happy to assist and answer any questions, including:- What is the performance I can expect during CDC and query based replication?
- How do I know my data sync is successful?
- Can I set a specific time to start my data sync?