Re: [PATCH] V3: Idle in transaction cancellation

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: [PATCH] V3: Idle in transaction cancellation
Date: 2010-12-15 12:13:30
Message-ID: 201012151313.31546.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 15 December 2010 02:20:31 Robert Haas wrote:
> On Sat, Oct 30, 2010 at 4:49 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> >> > Here is a proposed patch which enables cancellation of $subject.
>
> Disclaimer: This isn't my area of expertise, so take the below with a
> grain or seven of salt.
I don't know whos area of expertise it is except maybe, surprise, surprise,
Toms.

> It sort of looks to me like the LOG_NO_CLIENT error flag and the
> silent_error_while_idle flag are trying to cooperate to get the effect
> of throwing an error without actually throwing an error. I'm
> wondering if it would be at all sensible to do that more directly by
> making ProcessInterrupts() call AbortCurrentTransaction() in this
> case.
Hm. I think you want the normal server-side error logging continuing to work.

Its not really throwing an error without throwing one - its throwing one
without confusing the heck out of the client because the protocol is not ready
for that. I don't think introducing an "half-error" state is a good idea
because one day the protocol maybe ready to actually transport an error while
idle in txn (I would like to get there).

> I'm not sure if this would work, or if it's better. I'm just throwing
> it out there, because the current approach looks a little grotty to
> me.
I with you on the grotty aspect... On the other hand the whole code is not
exactly nice...

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-15 12:33:30 Re: [PATCH] V3: Idle in transaction cancellation
Previous Message Magnus Hagander 2010-12-15 11:47:18 Default mode for shutdown