0

I have a PostgreSQL DB on Amazon RDS. I need a replication available on a different AWS Region for having high availability. I read the Posgres Docs here. However, I'm not sure if the replication slots are also replicated (along with the lsn's).

Can someone throw some light on this? Also, if the replication slots are not duplicated on the RDS replica (in the different region), how do I manage a region failure?

ghost
  • 1,107
  • 3
  • 12
  • 31

1 Answers1

2

In PostgreSQL, replication slots are not replicated. You can, however, create replication slots on standby servers, if you want to use cascading replication.

There is no need to replicate a replication slot.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • So suppose the entire region goes down, and I want to resume reading from the last read point. How do I handle that without duplicating replication slots on a different AWS region? – ghost May 08 '20 at 10:56
  • Why would you need to duplicate replication slots for failover? – Laurenz Albe May 08 '20 at 11:52
  • I'm reading from a replication slot, and once the region goes down, I'd like to resume from where I had last read, rather than reading the entire stuff again. – ghost May 08 '20 at 12:35
  • You are not reading from replication slots, but from a server. The standby knows the location where to resume replication, so you don't have to worry about that. Replication slots just keep primaries from discarding WAL information that a standby might still need. If you fail over to another server, you should create a replication slot there as part of the failover process. – Laurenz Albe May 08 '20 at 13:28