Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for logical replication slots with HA (#1962) #1997

Closed
wants to merge 1 commit into from

Conversation

sjuls
Copy link
Contributor

@sjuls sjuls commented May 3, 2023

Implement support for cloning logical replication slots from primary to standbys and advancing the LSN in the same cadence as the current physical replication slots.

The cloning is performed by reading the logical replication slot state off the disk of the primary through the SQL layer, then restarting the standby instance to pick up the new logical replication slot. From PostgreSQL 16 it should be possible to create the logical replication slots directly through SQL, which is also supported in the PR.

The HA logical replication is an extension of the HA physical replication slots, and is therefore enabled through the .spec.replicationSlots.highAvailability.enabled property in the Cluster CRD.

Also in the PR;

  • Bump manager limits to mitigate restarts in e2e tests due to failed health checks.
  • Change run-e2e.sh to not fail if cnpg-system namespace is already created.

Closes #1962

@github-actions github-actions bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.18 release-1.19 release-1.20 labels May 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

…pg#1962)

Signed-off-by: Jakob Schultz-Falk <sjulsbe@gmail.com>
@ozen
Copy link

ozen commented Sep 17, 2023

Hi there. Is this PR forgotten :(

@sxd @mnencia

@sjuls
Copy link
Contributor Author

sjuls commented Sep 17, 2023

Hi there. Is this PR forgotten :(

@sxd @mnencia

Don't actually think the PR is relevant anymore since pg_failover_slots has become a managed extension in CloudNativePG.

https://cloudnative-pg.io/documentation/1.20/postgresql_conf/#enabling-pg_failover_slots

I'll close this PR.

@sjuls sjuls closed this Sep 17, 2023
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-requested ◀️ This pull request should be backported to all supported releases release-1.19 release-1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support HA for logical replication slots
4 participants