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

replication #186

Open
ymsaout opened this issue Jun 30, 2016 · 3 comments
Open

replication #186

ymsaout opened this issue Jun 30, 2016 · 3 comments

Comments

@ymsaout
Copy link

ymsaout commented Jun 30, 2016

Hi,

Is there something to manage replication ? do you plan to accept PR for that ?

Thank you.

@davidak
Copy link

davidak commented Mar 16, 2017

Yes. I set up streaming replication (async) with this role and it works just fine.

Have a look at the vars:

https://github.com/ANXS/postgresql/blob/master/defaults/main.yml#L203

I used this tutorial for orientation on the config and the instructions for the initial backup.

https://www.howtoforge.com/tutorial/postgresql-replication-on-ubuntu-15-04/

On the standby i executed this commands manually:

systemctl stop postgresql
rm -rf /var/lib/postgresql/9.6/main/
su - postgres
pg_basebackup -h master -D /var/lib/postgresql/9.6/main -U replication -v --progress --checkpoint=fast --xlog-method=stream -R
cd /var/lib/postgresql/9.6/main
vim recovery.conf
+ trigger_file = '/tmp/postgresql.trigger.5432'

exit
systemctl start postgresql

(Used Ubuntu 16.04 and Ansible 2.2)

@trotro
Copy link

trotro commented May 7, 2020

Hi,
I have a playbook to enable streaming replication. But It’s not idempotent, because the replication is done from scratch. If someone is willing to help, I can work on it.

@egmont1227
Copy link
Contributor

You can find repmgr replication feature in #424

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

5 participants