문제

I have a master slave configuration for my production stage environment. Sometimes I need to write to some tables of my stage server i.e slave server. In that case conflicts occurs as content from both master and slave differs. So is there any option that for some particular tables if conflict occurs I want to give priority to the content of the tables in slave server. So that it will not be overridden by the data from master server.

Note: I am very new to database and devops. So please bear me and let me know if it is a noob question.

도움이 되었습니까?

해결책

No.

The Master and the Slave should always (aside from a minor delay) have identical data. If they don't, you need to investigate and fix it. Else, things could get worse and worse.

Percona Tools has a tool to discover whether there are differences between Master and Slave, plus a tool to fix them for you. However, it assumes that the Master is the Master, not the Slave.

Is the Slave universally the "better"? Then consider "failing over" -- That is, make the Slave the Master and the Master the Slave. Now, your problem (as stated) goes away.

(Sorry, there are too many details to spell out details of all the steps you need in this Q&A.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top