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

To support replication slot between primary and standby cluster #874

Open
viggy28 opened this issue May 7, 2022 · 2 comments
Open

To support replication slot between primary and standby cluster #874

viggy28 opened this issue May 7, 2022 · 2 comments

Comments

@viggy28
Copy link

viggy28 commented May 7, 2022

What would you like to be added:

To use replication slot when performing streaming replication primary and standby cluster

Why is this needed:

Right now, standby clusters just connect to primary without replication slot. Primary doesn't know how much WAL to retain that's needed by standby. Stolon does support slot based replication within clusters but not between clusters.

Before digging the codebase, want to make sure this something doable.

Screen Shot 2022-05-07 at 11 18 19 AM

@rnaveiras
Copy link
Contributor

hey @viggy28

See https://github.com/sorintlab/stolon/blob/master/doc/cluster_spec.md#standbysettings
You can use primarySlotName to write the slot name that you want to use. The only thing is that you need to create that slot manually at the source.

@viggy28
Copy link
Author

viggy28 commented Jun 3, 2022

Thanks @rnaveiras. Sorry about the delay.

The challenge is how does one manage when there is a failover? Manually, creating and dropping slots is more maintenance. Also, leaving an inactive replication slot can cause more issues (main one is blocking WAL archiving).

Wondering shouldn't this be automated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants