Re: An example of bugs for Hot Standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Hiroyuki Yamada <yamada(at)kokolink(dot)net>, Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: An example of bugs for Hot Standby
Date: 2010-01-21 10:05:05
Message-ID: 1264068305.4043.6607.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2010-01-21 at 18:01 +0900, Hiroyuki Yamada wrote:
> >Deadlock bug was prevented by stop-gap measure in December commit.
> >
> >Full resolution patch attached for Startup process waits on buffer pins.
> >
> >Startup process sets SIGALRM when waiting on a buffer pin. If woken by
> >alarm we send SIGUSR1 to all backends requesting that they check to see
> >if they are blocking Startup process. If so, they throw ERROR/FATAL as
> >for other conflict resolutions. Deadlock stop gap removed.
> >max_standby_delay = -1 option removed to prevent deadlock.
> >
> >Reviews welcome, otherwise commit at end of week.
> >
>
> I think the patch has two problems.
>
> * disable_standby_sig_alarm() does not clear standby_timeout_active flag
> when it succeeds in disabling the alarm.
>
> * Assertion check in HoldingBufferPinThatDelaysRecovery() can fail
> with following scenario.

Updated patch, including changes from Andres and Hiroyuki.

--
Simon Riggs www.2ndQuadrant.com

Attachment Content-Type Size
sigalrm_startupbufferpin.v2.patch text/x-patch 30.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-01-21 10:09:33 Re: Git out of sync vs. CVS
Previous Message Magnus Hagander 2010-01-21 10:02:13 Re: Git out of sync vs. CVS