[PG16][Phase 1] Implement Multi slot Logical Replication for the Upgrade playbook
Summary
Single-slot logical replication don't support the current patroni-main
workload.
We require multi-slot logical replication because after the writer switchover, we can have reverse replication to the older database version, and if we notice performance regression on the new version we can revert the workload back into the old version without data loss.
This reverse logical replication ideally should be enabled for a couple of days.
Multi-slot logical replication implementation was started at: https://gitlab.com/gitlab-com/gl-infra/db-migration/-/blob/master/pg-upgrade-logical/switchover.yml?ref_type=heads#L152
PG14 improvement Reference: #24418 (comment 1557941752)
DRIs
- DBRE contact for this request: @rhenchen.gitlab
- SRE contact for this request: TBD
- QA contact for this request:
- Backend Engineer contact for this request:
- Manager contact for this request:
SRE Support Needed
Desired Outcome/Acceptance Criteria
- Stable multi-slot replication after the Writer switchover, with consistently small lag, which should allow us to rollback into the previous database version and support peak workloads up to 5 WALs per second;
Edited by Rafael Henchen