Re: An example of bugs for Hot Standby

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

On Wed, 2010-01-20 at 11:04 +0100, Andres Freund wrote:
> On Wednesday 20 January 2010 10:52:24 Simon Riggs wrote:
> > On Wed, 2010-01-20 at 10:45 +0100, Andres Freund wrote:
> > > LWLockAcquire
> >
> > I'm using spinlocks, not lwlocks.
> CancelDBBackends which is used in SendRecoveryConflictWithBufferPin which in
> turn used by CheckStandbyTimeout triggered by SIGALRM acquires the lwlock.

Those are used in similar ways to deadlock detection.

> Now that case is a bit less dangerous because you would have to interrupt
> yourself to trigger a deadlock there because the code sleeps soon after
> setting up the handler.
> If ever two SIGALRM occur consecutive there is a problem.

I'll protect against subsequent calls.

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2010-01-20 10:48:49 Re: An example of bugs for Hot Standby
Previous Message Leonardo F 2010-01-20 10:27:49 Re: Review: Patch: Allow substring/replace() to get/set bit values