For PeerDB Cloud users: Note that one of the steps below requires the intervention of PeerDB support.
Steps
- Create a dummy table, and add the table to all mirrors
- Make sure ALL writes to the database stop. In other words, put the application in maintenance/downtime.
- Add a row to the dummy table using :
- Wait for PeerDB to catch up. You can check the syncs of the mirrors in PeerDB UI in the Overview tab.
- Pause all mirrors.
- Save the name of your replication slot before dropping it, then upgrade your PostgreSQL instance.
- If you are using PeerDB OSS:
Set the
last_offsetfield of the mirrors to 0 in themetadata_last_sync_statetable in thecatalogPostgres container. You canpsqlinto that container and run :
- After the upgrade is complete, create new logical replication slots for the mirrors.
It is very important that the name of these slots are the same as the previous slots which the mirrors were using.
If PeerDB created the replication slot of a mirror, then the slot name will be
peerflow_slot_<mirror_name>. If you provided the replication slot name, then you should use that name (as stored earlier in step 6).
- Resume all mirrors.
- Remove application from maintenance.
- Check if the mirrors are syncing correctly.

