.avro
files. Please fill in your AWS credentials in PeerDB’s docker-compose file before running it.
Step 1: CREATE Postgres and S3 Peers
- CREATE Postgres PEER. Make sure it satisfies the prerequisites required for our mirror.
- CREATE S3 PEER
Step 2: Create and populate tables on the Postgres PEER
Below script helps creates and populatepeerdb_demo
with 10 rows on your PostgreSQL peer.
Step 3: Kick off Streaming Query Replication
Step 4: Monitor the MIRROR
You can connect tolocalhost:8085
to gain full visibility into the different jobs and steps that PeerDB performs under the hood to manage the MIRROR.
Step 5: Validate the MIRROR
In a few seconds the MIRROR should complete syncing data. Now validate the data on both postgres and S3 peers. The number of.avro
files in the bucket should be equal to the number of partitions (total rows in your source table divided by num_rows_per_partition
). In this case, there should be exactly 5
files.