473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DR replication Stoped after failover

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
3 2355
zmbd
5,501 Expert Mod 4TB
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
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
5,501 Expert Mod 4TB
Best of Luck - hopefully one of the other experts has more experience with this DB
Jul 30 '18 #4

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

Similar topics

0
by: Leigh Stevens | last post by:
I need to have a script that will stop replication before we failover to our high availability server. I am running on SQL Server 2000. I really only need the command line syntax. I can write the...
2
by: Ian Wyld | last post by:
Hello All We intend to replicate a database in order to have it as a near immediate standby in case of the failure of the main server. Is this the best solution for disaster recovery? We...
1
by: adiavr | last post by:
Hi, I have read up on MySQL failover/replication and decided that weren't many cons to setting up two way replication where two servers are both master and slave to eachother. Here's the my.cnf:...
10
by: Chris Travers | last post by:
Hi-- I had been thinking of the issues of multimaster replication and how to do highly available, loadballanced clustering with PostgreSQL. Here is my outline, and I am looking for comments on...
9
by: Jan Wieck | last post by:
Dear community, for some reason the post I sent yesterday night still did not show up on the mailing lists. I have set up some links on the developers side under...
5
by: Tony Hinkle | last post by:
I am working on an application note to provide instructions on how to use a real-time file replication application to provide disaster recovery for DB2. I basically need to know how to identify...
1
by: GB | last post by:
Hi, I'm trying to find an easy, efficient and safe site-to-site backup/failover solution. The idea is to have anytime a remote copy of 99.99% of the data. Productive db -> VPN (internet) ->...
5
by: johnm | last post by:
Here is my situation. We run a very mission critical application that uses DB2 7.2 for the data repository. The database is hosed at a data center in Los Angeles, Ca. Our main office...
1
by: laststubborn | last post by:
Hi All, I would like to set up transactional replication with failover cluster. Did anybody tried this? Does it work together? Is there anything I should be coutios when I set up these together?...
1
by: mmark751969 | last post by:
We have a sql server 2000 sp3 server on a win2k3 server standard edition. This is on dell hardware with a dell scsi dasd enclosure directly attached. We want to duplicate the hardware and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.