Skip site navigation (1) Skip section navigation (2)

Re: Hot Standby and deadlock detection

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: Hot Standby and deadlock detection
Date: 2010-02-01 15:59:22
Message-ID: 1265039962.13782.12419.camel@ebony (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, 2010-02-01 at 17:50 +0200, Heikki Linnakangas wrote:
> 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?

Cos the code to do that is easy.

I'll do the deadlock check immediately and make it even easier.

 Simon Riggs 

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-01 16:06:11
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Previous:From: Simon RiggsDate: 2010-02-01 15:58:02
Subject: Re: Hot Standby and VACUUM FULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group