AW: Big projet, please help
От | Zeugswetter Andreas SB |
---|---|
Тема | AW: Big projet, please help |
Дата | |
Msg-id | 219F68D65015D011A8E000006F8590C604AF7DC9@sdexcsrv1.f000.d0188.sd.spardat.at обсуждение исходный текст |
Список | pgsql-hackers |
> Hi all, > > I'm faced to a big problem!! > > I have to do this for a customer: > > create a database on my server; this database will be queried > and updated > through the web --- this is easy > > H!ave the same databse on my customer server. This databse > will be queried > and updated by the customer . -esay too > > The 2 databases have to be synchronized both ways ! Huh How can I do > that??? > > Can you give me some pointers... I'd love to do it with postgresql > instead of going to Oracle just because they can replicate bases... In an environment with moderate to low update activity at least on one side the simplest and most reliable replication mechanism is usually done with triggers that work on the primary key. They provide a synchronous replication on the basis of all or nothing, and thus solve the problem of concurrent update to the same row from both sides. The tricky part is usually how to break the trigger chain. In Informix you can set global stored procedure variables to "local" and "remote" and only trigger if that variable is set to "local". (create trigger .... when myconn()="local" ...) Andreas
В списке pgsql-hackers по дате отправления: