Re: Cancelling idle in transaction state - Mailing list pgsql-hackers

From Joachim Wieland
Subject Re: Cancelling idle in transaction state
Date
Msg-id dc7b844e0912310641s575554bbq1248a17dbdb33f37@mail.gmail.com
Whole thread Raw
In response to Re: Cancelling idle in transaction state  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Cancelling idle in transaction state  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Thu, Dec 31, 2009 at 3:03 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> This patch extends SIGINT to allow cancellation of transactions while
> idle in both HS and normal mode. It also changes the standard message
> reported on an idle transaction in aborted state to '<IDLE> in
> transaction (aborted)', so that once aborted we keep the message even if
> the user tries to issue further statements other than ROLLBACK or
> COMMIT.
>
> This also solves the bug reported by Kris Jurka.

Was the bug reported by Kris really only about lost synchronization or
was it about SIGINT now cancelling idle transactions which it did not
do previously?

I still think that we should have three transaction cancel modes, one
to cancel an idle transaction, another one to cancel a running query
and a third one that just cancels the transaction regardless of it
being idle or not. This last one is what you are implementing now, and
it is what HS wants to do. However I think that Kris only wants to
cancel a running query but not an idle transaction. And an
administrator who wants to cancel an idle transaction can never be
sure that the transaction that he checked which has just been idle is
still idle...

> (Further changes pending on HS side, so not all issues resolved by this.
> I intend to use this mechanism for HS cancellations when
> CONFLICT_MODE_ERROR, and another mechanism for CONFLICT_MODE_FATAL.)

CONFLICT_MODE_FATAL is what you are planning to implement via SIGUSR1
multiplexing then?


Joachim


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: A third lock method
Next
From: fangfang liu
Date:
Subject: Re: add xml support function