New Master and Slave-2 are not in sync

SOLVED
Highlighted
Level 3 Adventurer

New Master and Slave-2 are not in sync

Hi Team,

I'm tesign failover senario on EFM 3.2. I've killed postgress process to bring down the Masterd database, as expected one out of two Slave databases are promoted to Master, but now the new master and second slave databases are not in sync. Could you help me to understand/trouble shoot to make new master and slave2 in sync without bringing up the crashed (old) Master DB.

Pic6.png

 Pic7.png

Archived Discussions


Effective March 31st, we will no longer engage on PostgresRocks.


How to engage with us further?


  • Thought Leadership: EDB Blogs

  • Tips and Tricks: Postgres Tutorials

  • Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket

  • Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
EDB Team Member

Re: New Master and Slave-2 are not in sync

Hi Mahisha,

 

Glad to hear that your able to fix the slave-2 issue. Could you please check this location "/finbdodbprod/edb/data/pg_log" I suspect that your database logs may reside here.

View solution in original post

Highlighted
Level 3 Adventurer

Re: New Master and Slave-2 are not in sync

Yes Kapil, the logs are available in the specified location. Thank you so much for your inputs :) 

View solution in original post

6 REPLIES 6
Highlighted
EDB Team Member

Re: New Master and Slave-2 are not in sync

Hi Mahisha,

 

One of the resason should be for slave2 server to be out of sync is that, In slave2 server in recovery.conf file the parameter 

primary_conninfo the host='<might be pointing to old master server>' and not the new master server. Could you please chnage this accordingly and restart the slave2 server. If this is not the case then could you please share the database logs from slave2 server for further investigation.

Highlighted
Level 3 Adventurer

Re: New Master and Slave-2 are not in sync

Hi Kapil,

Thank you very much for the response, I've verified recovery.conf file on Slave-2, the host IP is automatically updated.

 

Pic8.png

Unfortunately I could not see any content in edb log file located in /var/log/edb/as-9.6/edb-as-9.6.log

Pic9.png

Where else can I look for the errors. pls suggest. 

Tags (1)
Highlighted
EDB Team Member

Re: New Master and Slave-2 are not in sync

Hi Mahisha,

Could you please provide the below details along with EFM logs from the slave2 server.

1) show logging_collector ;

2)  show log_directory ;

 

Highlighted
Level 3 Adventurer

Re: New Master and Slave-2 are not in sync

Hi Kapil,

 

I'm able to resolve the error by adding below parameter in recovery.conf on Slave-2 database, now the new Master and Slave-2 databases are in sync. 

recovery_target_timeline = 'latest'

 

Still I could not able to locate my database logs, please find below screenshots. Pls suggest.

 

Pic10.png

Highlighted
EDB Team Member

Re: New Master and Slave-2 are not in sync

Hi Mahisha,

 

Glad to hear that your able to fix the slave-2 issue. Could you please check this location "/finbdodbprod/edb/data/pg_log" I suspect that your database logs may reside here.

View solution in original post

Highlighted
Level 3 Adventurer

Re: New Master and Slave-2 are not in sync

Yes Kapil, the logs are available in the specified location. Thank you so much for your inputs :) 

View solution in original post

© 2019 EnterpriseDB Corporation. All rights reserved.   |   Privacy Policy   |  Terms of Use   |   Trademarks