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

Re: Hot Standby and deadlock detection

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(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 07:40:16
Message-ID: 4B668560.2080808@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

Generally speaking, max_standby_delay==-1 codepath shouldn't be any
different from the max_standby_delay>0 codepath.

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

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-02-01 08:02:46
Subject: Re: Hot Standby and VACUUM FULL
Previous:From: Fujii MasaoDate: 2010-02-01 07:39:58
Subject: BUG #5304: psql using conninfo fails in connecting to the server

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