[LUGOS] mysql kro??na replikacija

Jure Koren idiots at gmail.com
Sun Jul 18 22:23:51 CEST 2004


On Sat, 17 Jul 2004 12:53:47 +0200, Matija Grabnar
<matija.grabnar at arnes.si> wrote:
> > Trenutno mysql 4.x ne podpira nobene pametne sheme za repliciranje.
> > Postgresql je boljsi in zanj obstajajo aplikacije, ki lahko izvajajo
> Ne bo drzalo:
> Ce pogledas http://dev.mysql.com/doc/mysql/en/Replication_Features.html, si
> lahko preberes:
> ====citat====
> # It is safe to connect servers in a circular master/slave
> relationship with the --log-slave-updates option specified. Note,
> however, that many statements will not work correctly in this kind of
> setup unless your client code is written to take care of the potential
> problems that can occur from updates that occur in different sequence
> on different servers. This means that you can create a setup such as
> this:
> 
> A -> B -> C -> A
> 
> Server IDs are encoded in the binary log events, so server A will know
> when an event that it reads was originally created by itself and will
> not execute the event (unless server A was started with the
> --replicate-same-server-id option, which is meaningful only in rare
> setups). Thus, there will be no infinite loop. But this circular setup
> will work only if you perform no conflicting updates between the
> tables. In other words, if you insert data in both A and C, you should
> never insert a row in A that may have a key that conflicts with with a
> row inserted in C. You should also not update the same rows on two
> servers if the order in which the updates are applied is significant.
> ====konec citata====

Ce sem jaz to prav prebral, potem pise, da se mora program zavedati
dejstva, da je podatkovna zbirka replicirana in se prilagajati sami
replikaciji. V praksi je to slaba resitev, ker v aplikacijo vnese
dodatno kompleksnost. Ker nisem imel in se vedno nimam casa toliko
popravit freeradius, da bi znal pravilno belezit podatke o klicnih
povezavah v krozno repliciran mysql streznik, se mi mysqlove
replikacijske sheme ne zdijo prakticno uporabne, zato sem predlagal
druge podatkovne zbirke kot eno boljsih moznih resitev.



More information about the lugos-list mailing list