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

logical replication slots #880

Open
Suhogruz opened this issue Jan 1, 2025 · 2 comments
Open

logical replication slots #880

Suhogruz opened this issue Jan 1, 2025 · 2 comments

Comments

@Suhogruz
Copy link

Suhogruz commented Jan 1, 2025

Hi! In our environment we have master and standy databases, on master databases we have logical replication slots.

How to manage logical replication slots in repmgr ? I mean sync them with standby after switchover.
Unfortunally I didn't find any information about it in documentation.

@Suhogruz Suhogruz changed the title logical repolication slots logical replication slots Jan 1, 2025
@martinmarques
Copy link
Collaborator

I think you should have a look at pg_failover_slots. It's a Postgres extension which I believe is available for most supported versions of Postgres (13 and up). If you use Postgres 17, it's built in the core (already available).

@Suhogruz
Copy link
Author

Suhogruz commented Jan 2, 2025

Thanks for advice!
We are testing switchover between two PostgreSQL servers (master - slave), both have 17 version and repmgr installed.

repmgr does not want to set primary_conninfo (with the dbname parameter inside) when standby database are starting.
And it does this every time during switching - it re-writes primary_conninfo.

If set the required primary_conninfo manually (with dbname), then the logical slot present on the reserve and everything looks great. But after the repmgr switchovers it disappears.
So far we can't understand why this is happening.

Our switchover command looks like this:
$repmgr_bin/repmgr -f $repmgr_conf standby switchover --superuser=$pg_superuser

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

No branches or pull requests

2 participants