Contents
How does Amazon RDS work with PostgreSQL?
Amazon RDS for PostgreSQL enables you to easily configure replicas of your source PostgreSQL instance to clear your read load and to create disaster recovery (DR) resources. You can configure Read Replicas within the same Region as the source or in a different Region.
Where are PostgreSQL parameters maintained in a DB?
PostgreSQL parameters that you set for a local PostgreSQL instance in the postgresql.conf file are maintained in the DB parameter group for your DB instance. If you create a DB instance using the default parameter group, the parameter settings are in the parameter group called default.postgres9.6 .
How to avoid replication lag with RDS PostgreSQL?
When you use an RDS PostgreSQL Read Replica instance, you both offload your read workload to a replica instance and reserve the source instance’s compute resources for write activities. But you must configure Read Replicas properly and set appropriate parameter values to avoid replication lag.
What happens when an IP address changes in PostgreSQL?
IP address changes include a DB instance name change or a DB instance class change. When the WAL stream that provides data to a read replica is broken, PostgreSQL switches into recovery mode to restore the read replica by using archived WAL files. When this process is complete, PostgreSQL attempts to re-establish streaming replication.
What’s the procedure for backing up PostgreSQL data?
While the procedure is essentially simple, it is important to have a clear understanding of the underlying techniques and assumptions. There are three fundamentally different approaches to backing up PostgreSQL data:
What are the rules for Amazon RDS backups?
Amazon RDS backups follow these rules: Your DB instance must be in the ACTIVE state for backups to occur. Automated backups and automated snapshots do not occur while a copy is executing in the same Region for the same DB instance. The first snapshot of a DB instance contains the data of the full DB instance.
How does RDS PostgreSQL support cross region replication?
RDS PostgreSQL also supports cross-region replication. In addition to scaling read queries, cross-region Read Replicas provide solutions for disaster recovery and database migration between AWS Regions. Instead of maintaining WAL retention based on wal_keep_segments, cross-region replication uses a physical replication slot at the source instance.
How to create a Read Replica in Amazon RDS?
To create a read replica in the same AWS Region as the source instance, RDS PostgreSQL uses Postgres native streaming replication. Data changes at the source instance stream to Read Replica using streaming replication. If the process is for any reason delayed, replication lags.
Can a PostgreSQL read replica be a new DB instance?
You can promote a PostgreSQL read replica to be a new source DB instance. However, the read replica doesn’t become the new source DB instance automatically. The read replica, when promoted, stops receiving WAL communications and is no longer a read-only instance.