Re: Cancelling idle in transaction state

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, James Pye <lists(at)jwp(dot)name>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kris Jurka <books(at)ejurka(dot)com>
Subject: Re: Cancelling idle in transaction state
Date: 2009-12-31 14:41:55
Message-ID: dc7b844e0912310641s575554bbq1248a17dbdb33f37@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 31, 2009 at 3:03 PM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message fangfang liu 2009-12-31 14:47:01 Re: add xml support function
Previous Message Kevin Grittner 2009-12-31 14:37:51 Re: A third lock method