DMS CDC and Postgres major update

0

What is the correct way to handle Postgres logical replication with DMS CDC after Postgres major update? Found out that RDS requires removal of logical replication slots before Postgres major version can be updated. So this means that CDC replication can't continue and we need to start moving the whole dataset from the beginning? or am I missing something?

1 Answer
1

Handling Replication Slots The requirement to remove logical replication slots before upgrading poses a challenge for continuous replication. However, you’re not necessarily required to move the whole dataset from the beginning after the upgrade. Consider the following:

  1. Stop Replication: Temporarily stop the replication process in DMS and ensure all changes are applied to the target database to prevent data loss.
  2. Remove Replication Slots: As required by RDS, remove the logical replication slots to proceed with the upgrade.
  3. Upgrade: Perform the major version upgrade on your RDS instance.

After the Upgrade

  1. Re-create Replication Slots: After the upgrade, re-create the logical replication slots. This step is crucial for resuming logical replication.
  2. Resume or Restart Replication:
  • Resume: In some cases, you might be able to resume replication by pointing to the new replication slot, assuming you can manage the sequence of changes accurately.
  • Full Load + CDC: More commonly, you’ll initiate a new replication task in DMS, starting with a full load and transitioning into CDC. This doesn't necessarily mean moving the entire dataset from scratch if you manage to synchronize the changes made during the upgrade process.
profile picture
EXPERT
answered a month ago
profile picture
EXPERT
Artem
reviewed a month ago
  • Yeah. Thanks. It kind of works to drop replication slot and then re-create it after major version upgrade. But it requires that application is prevented accessing database between dropping and re-creating the slot. Otherwise data is lost in replication. Also it seems that blue-green deployment won't work with DMS so that can't be used either.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions