Andrew Sullivan ajs at crankycanuck.ca
Mon May 14 04:47:19 PDT 2007
On Sun, May 13, 2007 at 10:08:13PM -0700, Bill Willits wrote:

> 2) How to coordinate or synchronize the master/slave so the application can 
> reliably update the master and query the slave for the just-updated data 
> without getting old/stale data.

You can't.  That's what I figured he was trying to do in my first
email, where I emphasised that this is async replication.  

In a fully async system like this, you just _cannot_ have read-write
queries dependent on data that is on the replicas, unless you're
willing to have your clients do a lot of extra work to make sure that
when you look at the replica, you are looking at one that has your
changes committed.  Practically speaking, anything that is "real-time
sensitive" needs to talk to a complete, up to date version of the
database, and that means you have to talk to the database that has
all the data, or else you have to figure out a way where sending the
wrong data back is acceptable.  Slony-I is just not designed for the
former kind of use (but if you can figure out ways where stale data
doesn't matter, it works ok).  It's not multimaster (if it were,
different sessions could write in different databases, and you could
bind a given session to a given back end, so you'd always see at
least your own changes).  It's also not synchronous.

A
-- 
Andrew Sullivan  | ajs at crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what 
you told them to.  That actually seems sort of quaint now.
		--J.D. Baldwin


More information about the Slony1-general mailing list