On Mon, Oct 08, 2007 at 01:22:31PM -0400, Kurt Overberg wrote:
> subscribers. Once those rows get replicated, things catch up and
> return to Normal. Is this correct? Does Slony guarantee that if I
> run two transactions, X and Y, and X goes through (hits the master)
> before Y, then Y will always appear on a subscriber after X has hit
> the subscriber?
More or less. Slony applies complete transactions in "agreeable
order". That is, tuples appear on the replicas in exactly the
apparent order they appear on the origin. There is no guarantee of
the _precise_ order in which the replica gets the tuples, in the
sense that statements are not re-played on the replica in the exact
temporal order they happened on the origin (because we don't replay
statements). But the order in which data appears on a replica will
be agreeable to the way you would have seen the data appear on the
origin, if you were looking at all of it.
Note that there is no guarantee of sync among replicas. Sync points
S0. . .Sn may be visible on replica 1 while replica 2 is still
labouring to reach Sn-10.
> Reason I ask: I have a very few points (< .5% of my inserts) in my
> application that really, REALLY need to treat the cluster as
> synchronous.
You seem to understand why this is dangerous. Ok.
> sync_test row comes across
on every node, right?
> I am guaranteed that my big huge insert
> has gone across to all nodes (or at least all nodes I care about).
> To my application, my insert query will not return until all
> replications are verified (yes, I know this can take many minutes,
> don't care). I have done informal tests and this appears to work at
> least under postgresql 8.0.4 and slony 1.1.5.
In principle, assuming the additional caveat I added, then yes, if
the new test value has appeared on the replica, and the INSERT in
question COMMITed _before_ the new test value COMMITed, then you can
be sure that the INSERT in question is also COMMITed on the replicas.
I note that there is no way for you to roll back in this case, but
you likely already figured that out.
A
--
Andrew Sullivan | [EMAIL PROTECTED]
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general