Add task to drop replication from secondary sites before proceeding with recovery
What does this MR do?
Adds task to remove all replication slots when recovering a demoted Primary as a new Secondary.
Secondary sites do not need replication slots. The recovery playbook also changes the setting max_replication_slots to 0, causing a conflict and preventing PostgreSQL from starting if there are leftover replication slots on the Secondary site.
Related issues
Relates #1194
Author's checklist
When ready for review, the Author applies the workflowready for review label and mention @gitlab-org/software-delivery/get-maintainers:
- Merge request:
- Corresponding Issue raised and reviewed by the GET maintainers team.
- Merge Request Title and Description are up-to-date, accurate, and descriptive
- MR targeting the appropriate branch
- MR has a green pipeline
-
MR has no new security alerts in the widget from the
Secret DetectionandIaC Scan (SAST)jobs.
- Code:
- Check the area changed works as expected across all expected permutations.
- Check that the changes work across upgrades.
- Documentation created/updated in the same MR if applicable
Edited by Grant Young