On 7/4/2007 10:56 AM, Christopher Browne wrote:
Andrew Sullivan <[EMAIL PROTECTED]> writes:
On Wed, Jul 04, 2007 at 10:10:08AM -0400, Jan Wieck wrote:
seems pretty deterministic, doesn't it? But the result of it depends on
the exact commit order and the transaction isolation level. We don't
capture the commit order of single transactions, nor do we care for it
anywhere in the Slony-I logic.
I think this is key. The current arrangement solves the problem
where the visibility rules as they were in force on the origin are
followed while applying on the replica. You're going to need to do
quite a bit of theoretical work here to show that the agreeable order
rules are followed in any grouping approach you take. Please see the
original concept paper on this exact point. MVCC is hard.
The only change I'd propose in handling grouping is to
opportunistically see if there are consecutive operations that may be
trivially joined together.
In effect, if the *old* logic generated the sequence of queries:
delete from my_table where id = 25;
delete from my_table where id = 82;
delete from another_table where id = 19;
delete from my_table where id = 45;
then there is only one "joining" possible, which is to combine the
first two delete queries into one, so that the overall sequence of
queries becomes thus:
delete from my_table where id = 25 or id = 82;
delete from another_table where id = 19;
delete from my_table where id = 45;
Actually, only an insert or update to the same table would interrupt the
possible grouping. But that is academic.
What I see here is that we are trying to come up with a special case
optimization for mass-deletes. No mass insert or update operations will
benefit from any of this. Do people do mass deletes that much that we
really have to worry about them?
Jan
That doesn't change anything about "agreeable ordering" as far as I
can see.
Of course, that example isn't much of a "win." What would be way more
interesting (from a performance perspective) is the case where there
are 25 deletes in a row from my_table that could be folded together.
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== [EMAIL PROTECTED] #
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general