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