Re: [HACKERS] database replication
От | Ed Loehr |
---|---|
Тема | Re: [HACKERS] database replication |
Дата | |
Msg-id | 38640E2D.75136600@austin.rr.com обсуждение исходный текст |
Ответ на | database replication (DWalker@black-oak.com) |
Список | pgsql-hackers |
DWalker@black-oak.com wrote: > 6) To handle replication I basically check the local "last > replication time" and compare it against the remote PGR_TIME > fields. If the remote PGR_TIME is greater than the last replication > time then change the local copy of the database, otherwise, change > the remote end of the database. At this point I don't have a way to > know WHICH field changed between the two replicas so either I do ROW > level replication or I check each field. I check PGR_TIME to > determine which field is the most current. Some fine tuning of this > process will have to occur no doubt. Interesting idea. I can see how this might sync up two databases somehow. For true replication, however, I would always want every replicated database to be, at the very least, internally consistent (i.e., referential integrity), even if it was a little behind on processing transactions. In this method, its not clear how consistency is every achieved/guaranteed at any point in time if the input stream of changes is continuous. If the input stream ceased, then I can see how this approach might eventually catch up and totally resync everything, but it looks *very* computationally expensive. But I might have missed something. How would internal consistency be maintained? > 7) The commandline utility, fired off by something like cron, could > run several times during the day -- command line parameters can be > implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES > FROM SERVER B. My two cents is that, while I can see this kind of database syncing as valuable, this is not the kind of "replication" I had in mind. This may already possible by simply copying the database. What replication means to me is a live, continuously streaming sequence of updates from one database to another where the replicated database is always internally consistent, available for read-only queries, and never "too far" out of sync with the source/primary database. What does replication mean to others? Cheers, Ed Loehr
В списке pgsql-hackers по дате отправления: