473,289 Members | 1,896 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,289 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 2352
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.