Edit on GitHub
How Can I Ensure Data Integrity When Upgrading My PostgreSQL Database Version?link
Questionlink
I plan on upgrading my PostgreSQL database to a more recent version. What steps should I take to ensure data integrity?
Environmentlink
PostgreSQL databases
Answerlink
Upgrading to a new PostgreSQL database version will destroy the database replication slot. To avoid data integrity issues, do the following:
- Pause the connector.
- Drop the replication slot.
- Upgrade the database.
- Recreate the replication slot.
- Initiate a historical re-sync.
- Resume the connector.