
Using logical replication, you can set up logical replication slots on your instance and stream database changes through these slots to a client like pgrecvlogical. The source database server is also known as the primary server, whereas the database server receiving the copied data is known as the replica server. High Availability, Load Balancing, and Replication Table of Contents 27.1. Amazon RDS supports logical replication for a PostgreSQL DB instance version 9.4.9 and higher and 9.5.4 and higher. PostgreSQL replication is defined as the process of copying data from a PostgreSQL database server to another server. Downside to this is we'd have to create a new RDS instance with each restore (since you can't restore a Snapshot to an existing instance), which changes the FQDN of the database (which we can mitigate using Route53 and a CNAME that gets updated, but this is complicated).Ĭreate a read-replica in the origin AWS account and open up security for that instance so they can just access it directly (but then my account is responsible for all the costs associated with hosting and accessing it). High Availability, Load Balancing, and Replication Documentation PostgreSQL 15 Supported Versions: Current ( 15 ) / 14 / 13 / 12 / 11 Development Versions: devel Unsupported versions: 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 Chapter 27.

Then create a Lambda (or other script) that triggers when the snapshot is placed in the S3 bucket and restore it. In the SSIS project you'll be able to connect to your primary Microsoft SQL Server, pull in the data from the source table, and then pull in the destination copy of the table on your AWS PostgreSQL instance, and then compare the two datasets for changes. Amazon Web Services RDBMS in the Cloud: PostgreSQL on AWS. They need to be able to pull data from our production database to hydrate their reports.įrom my research so far, it seems there are a couple options:Ĭreate a bash script that runs on a CRON schedule that uses pg_dump and pg_restore and stash that on an EC2 instance in one of the accounts.Īutomate the process of creating a Snapshot on a schedule and then ship that to the other accounts S3 bucket. Replication can be real-time through streaming replication or delayed through WAL archiving. We have another team that is building an analytics infrastructure in a different AWS account. The pglogical extension for PostgreSQL implements logical streaming replication, using a similar publish and subscribe built-in approach. If the process is for any reason delayed, replication lags.

The role is privileged, but you cant use it to modify any data. Data changes at the source instance stream to Read Replica using streaming replication. PostgreSQL uses a replication role to perform streaming replication.

I have an AWS account with a Postgres RDS database that represents the production environment for an app. To create a read replica in the same AWS Region as the source instance, RDS PostgreSQL uses Postgres native streaming replication. We tried to set a Lambda to consume every 15 minutes the Wal log of a replication slot of our Postgres database, and send it to a Kinesis Firehose data stream.
