By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 2,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

DR replication Stoped after failover

P: 2
Dear Team,

Recently, our staging database environment was not available so we had to promote the DR database using the script below.

Expand|Select|Wrap|Line Numbers
  1. [root@DRPOSDB tmp]# su postgres
  2. bash-4.2$
  3. bash-4.2$
  4. bash-4.2$
  5. bash-4.2$
  6. bash-4.2$ /usr/pgsql-9.2/bin/pg_ctl -D /target_directory promote
  7. pg_ctl: PID file "/target_directory/postmaster.pid" does not exist
  8. Is server running?
  9. bash-4.2$
  10. bash-4.2$
  11. bash-4.2$ locate postmaster.pid
  12. /var/lib/pgsql/9.2/data/postmaster.pid
  13. bash-4.2$
  14. bash-4.2$
  15. bash-4.2$ /usr/pgsql-9.2/bin/pg_ctl -D /var/lib/pgsql/9.2/data promote
  16. server promoting
  17. bash-4.2$
  18. bash-4.2$
  19. bash-4.2$
  20. bash-4.2$
No changes was made to the database while in DR because the live came up alomost immediately.

Now replication as stopped because DR was promoted from slave to master. Also, data has started coming to LIVE database.

How do we make replication to start again, i have not been able to see any documentation to do this.
Jul 28 '18 #1
Share this Question
Share on Google+
3 Replies


zmbd
Expert Mod 5K+
P: 5,397
Never worked with PostGreSql; however, looking through some documentation about this database I found this:
https://wiki.postgresql.org/wiki/Streaming_Replication
It mentions that this feature was added to PostgreSQL 9.0 - so I think this might be available; however, you don't mention which version you're using.

Towards the bottom of this page it mentions repeating from Step 6 - Might be a starting point.
Jul 29 '18 #2

P: 2
Thanks zmbd,

This is like revisiting the setup again. I will GI through it and get back.

I am currently on postgres9.2
Jul 29 '18 #3

zmbd
Expert Mod 5K+
P: 5,397
Best of Luck - hopefully one of the other experts has more experience with this DB
Jul 30 '18 #4

Post your reply

Sign in to post your reply or Sign up for a free account.