-
Notifications
You must be signed in to change notification settings - Fork 576
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
Add repmgr extension #424
Add repmgr extension #424
Conversation
The code looks solid! I wonder with how much PostgreSQL is investing in replication if this is going to be something that people will need long term. Would make more sense to me as its own role that users can install and use alongside this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the automated Travis tests be updated to install/test this?
Just wanted to chime in and say that I haven't abandoned this. I just can't find time to fix this at the moment. |
9402e17
to
abfecb5
Compare
0f084b1
to
0121cd4
Compare
0121cd4
to
03733f0
Compare
@gclough I've added an installation test and as there is a step in the extension to verify cluster functionality I feel pretty okay with this now. I will say though that I'm not at all familiar with Travis and it feels like I have shoe-horned a test into the existing suite so if someone could provide some pointers on that it would be appreciated. |
this one is extended by Demonware#3 and working at https://github.com/noris-network/ansible-postgresql/tree/add-repmgr-extension |
@egmont1227 and @rbjorklin - thank you much for your work on this. One thing that bit me on @egmont1227 's branch was that in |
Hey all, another issue to note that should be a quick fix: https://github.com/noris-network/ansible-postgresql/blob/add-repmgr-extension/tasks/extensions/configure_repmgr.yml#L100 assumes - name: Repmgr | Clone standby
command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -p {{ postgresql_port }} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf standby clone"
become: yes
become_user: "{{ postgresql_service_user }}"
when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout |
@egmont1227 and @rbjorklin I was able to get this working on |
True, we also jumped upon it and got it working some time ago. Thank you for your review on noris network branch. Will look into it.
This is done differently. See https://github.com/2ndQuadrant/repmgr/blob/dd8204e01354ce75a6fa49eefc804fe5d24e8e56/repmgr.conf.sample#L167 for the example config-snippet and e.g. https://github.com/noris-network/ansible-postgresql/blob/0c15305a9e67529b992c0ec9df57fdda424fff9b/templates/repmgr.conf-5.0.j2#L168 defining the variable
You are right. Have to investigate either use |
@egmont1227 I did end up adding in quite a few workarounds, many are hacks that I'd like to figure out (Debian-specific changes, for systemd, etc.) but if you want to glance over it nonetheless, check out the changes at https://github.com/robustq/postgresql/commits/master |
I'm in the process of doing similar work, but would love if one of the PRs were merge ready. Postgresql doesn't appear to have an interest in trying to do the featureset of repmgr sofar. Being able to construct automatic HA failovers is a huge gain. |
This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! |
I no longer care about this. Anyone who wants to; feel free to adopt and use this as you please. |
This PR adds opt-in functionality for Postgres replication controlled by repmgr.