Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.
Date: 2010-01-25 08:56:33
Message-ID: 4B5D5CC1.6070005@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Simon Riggs wrote:
> On Mon, 2010-01-25 at 09:52 +0200, Heikki Linnakangas wrote:
>> Would this simple scheme work:
>>
>> When the startup process has waited for a short while (ie
>> deadlock_timeout), it sends the signal "please check if you're holding a
>> pin on buffer X" to all backends. When a backend receives that signal,
>> it checks if it is holding a pin on the given buffer *and* waiting on a
>> lock. If it is, abort the transaction. Assuming that a backend can only
>> block waiting on a lock held by the startup process, deadlock detection
>> is as simple as that.
>
> No, it won't work. A deadlock could occur after the startup process has
> already been waiting for longer than the deadlock timeout.

Retry every deadlock_timeout seconds?

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-01-25 08:59:20 Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.
Previous Message Simon Riggs 2010-01-25 08:49:37 Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-01-25 08:59:20 Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.
Previous Message Simon Riggs 2010-01-25 08:55:40 Re: default_language