Skip to content

fix: handle pg_replication_slots/pg_stat_replication on replicas and cascading replicas #548

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

Conversation

michael-todorovic
Copy link
Contributor

Hello,
This PR aims to fix #547 where pg_replication_slots and pg_stat_replication metrics don't work well on replicas and cascading replicas (also known as standby leaders on Patroni). This allows standby clusters replication to be monitored :)

It has been tested on pg 13, 10.7 and 9.6

Copy link

@dan-aksenov dan-aksenov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. At least for versions ">=10.0.0"

@dan-aksenov
Copy link

Is there any chance to get review by someone with write access?

Copy link

@rockyluke rockyluke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@sebastiangaiser
Copy link

Any news?

@michael-todorovic
Copy link
Contributor Author

@mblp I just rebased this MR, basically moving my changes to queries.go.
Could you please approve again (and hopefully merge)?

@michael-todorovic
Copy link
Contributor Author

@mblp @SuperQ may I ask a review and hopefully an approval please? 🙏

@lbacigalgti
Copy link

Bump, can some review and merge this?

@loukoulouc
Copy link

Can some review and merge this?

@scanterog
Copy link

What are we missing to get this merged?

@michael-todorovic
Copy link
Contributor Author

Actually there's a better change that #914 gets merged as there was more activity on that MR. This is the same exact code now 😂

@sysadmind
Copy link
Contributor

Merged via #1048

@sysadmind sysadmind closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "WAL control functions cannot be executed during recovery" for pg_replication_slots
9 participants