May 2017
Beginner
416 pages
10h 37m
English
So far you have learned a lot about replication already. In the next step, it is important to take a look at replication conflicts. The main question arising straight away is how can a conflict can ever happen in the first place?
Consider the following example:
|
Master |
Slave |
|
BEGIN; |
|
|
SELECT ... FROM tab WHERE ... |
|
|
... running ... |
|
|
DROP TABLE tab; |
... conflict happen ... |
|
... transaction is allowed to continue for 30 seconds ... |
|
|
... conflict is resolved or ends before timeout ... |
The problem here is that the master does not know that there is a transaction happening on the slave. Therefore, the DROP TABLE command does not block until the reading transaction is gone. If those two transactions ...
Read now
Unlock full access