Re: Review: Hot standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Review: Hot standby
Date
Msg-id 1227866462.20796.133.camel@hp_dx2400_1
Whole thread Raw
In response to Re: Review: Hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Review: Hot standby
List pgsql-hackers
On Thu, 2008-11-27 at 17:14 +0000, Simon Riggs wrote:
> On Wed, 2008-11-26 at 18:02 +0530, Pavan Deolasee wrote:
> 
> >         I think whats happening is that
> >         ResolveRecoveryConflictWithVirtualXIDs() is failing to abort
> >         the open transaction 
> > 
> > 
> > Btw, ISTM that SIGINT works only for statement cancellation. So if the
> > transaction is in idle state, SIGINT has nothing to cancel and hence
> > also fails to abort the transaction.
> 
> [If I read this correctly this second post is the cause of the first
> problem, so we have one problem, rather than two.]
> 
> Understood; yes that seems to be a problem.

After some thought, the way I would handle this is by sending a slightly
different kind of signal.

We can send a shared invalidation message which means "end the
transaction, whether or not you are currently running a statement". We
would then send the backend a SIGUSR1 to ensure that it reads the shared
invalidation message as soon as possible. This is easily possible with
the new sinval processing for 8.4.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: "Fujii Masao"
Date:
Subject: Immediate shutdown during recovery
Next
From: "Fujii Masao"
Date:
Subject: Re: Immediate shutdown during recovery