Re: Hot Standby and deadlock detection - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Hot Standby and deadlock detection
Date
Msg-id 4B66F82C.7010007@enterprisedb.com
Whole thread Raw
In response to Re: Hot Standby and deadlock detection  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Hot Standby and deadlock detection
Re: Hot Standby and deadlock detection
List pgsql-hackers
Simon Riggs wrote:
> On Mon, 2010-02-01 at 09:40 +0200, Heikki Linnakangas wrote:
>> Simon Riggs wrote:
>>> The way this would work is if Startup waits on a buffer pin we
>>> immediately send out a request to all backends to cancel themselves if
>>> they are holding the buffer pin required && waiting on a lock. We then
>>> sleep until max_standby_delay. When max_standby_delay = -1 we only sleep
>>> until deadlock timeout and then check (on the Startup process).
>> Should wake up to check for deadlocks after deadlock_timeout also when
>> max_standby_delay > deadlock_timeout. max_standby_delay could be hours -
>> we want to detect a deadlock sooner than that.
> 
> The patch does detect deadlocks sooner that that - "immediately", as
> described above.

Umm, so why not run the deadlock check immediately in
max_standby_delay=-1 case as well? Why is that case handled differently
from max_standby_delay>0 case?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH]
Next
From: Robert Haas
Date:
Subject: Re: contrib\xml2 package's xpath_table function in PostgreSQL