Christopher Browne cbbrowne at ca.afilias.info
Wed Sep 26 15:23:53 PDT 2007
Jeff Frost wrote:
> On Wed, 26 Sep 2007, Christopher Browne wrote:
>
>> Jeff Frost <jeff at frostconsultingllc.com> writes:
>>> For extra background on this bug, see the thread here:
>>> http://lists.slony.info/pipermail/slony1-general/2007-September/006687.html 
>>>
>>>
>>> This is on Slony1-1.2.10, PostgreSQL-8.1.9:
>>>
>>> I've run into a situation on a client cluster composed of a master and
>>> 2 slave nodes where a deadlock on one of the slaves happens quite
>>> regularly during any EXECUTE SCRIT commands.  It seems if slony loses
>>> the deadlock, some of the tables are left in a not altered for
>>> replication state and this breaks replication.
>>
>> I'm going to set up (heh) a test case, let's call it
>> "testdeadlockddl", which will try to "tickle" this problem.
>>
>> The approach:
>>
>> - I'll start by creating a set that is replicated, and where some data
>>  is flowing thru.
>>
>> - I'll set up some queries against the replica in order to try to
>>  encourage deadlocks.
>>
>> - Then an "EXECUTE SCRIPT" will try adding a new table.  As a side 
>> effect,
>>  it will implicitly require locks on all the replicated tables.
>>
>> I don't see that there are other particular details to this, right?
>
> You seem to be right on the money with my experience, Christopher.  
> Perhaps if your slave is inside a VM making it a little less 
> performant would be more likley to cause the deadlock and show the 
> problem?  I mention this because our slave is not as performant as the 
> master and so it deadlocks more often during execute scripts than the 
> master did when the master shoulders the entire load.
>
I have a test added in; it hasn't yet tickled any deadlocks, so I think 
I'm not yet seeing the pattern of queries that you are using.

I'll fight further with this tomorrow; if it's at all possible for you 
to show a pattern of queries (not involving Slony-I necessarily at all) 
that causes the deadlock to emerge, that would be helpful.

This is NOT about system load - deadlocks can emerge under pretty simple 
conditions, and the simpler the condition we can come up with, the 
better.  A good test case for this won't involve variations of load - it 
should be able to remain pretty simple.


More information about the Slony1-bugs mailing list