Re: [PATCH] V3: Idle in transaction cancellation

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
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 14:40:20
Message-ID: AANLkTimBH6vqpqyz+7N_eQaM7mn1-Rp8FFt2wkqLj74H@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 15, 2010 at 7:47 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> I thought about doing that first. Btw, LOG_NO_CLIENT is just a more abstracted
> way of what COMERROR did before...

Hmm, but it must not be quite the same, because that didn't require
the silent_error_while_idle flag.

>> Yeah.  I'll try to find some time to think about this some more.  It
>> would sure be nice if we could find a solution that's a bit
>> conceptually cleaner, even if it basically works the same way as what
>> you've done here.
> I would like that as well. I am not sure you can achieve that in a reasonable
> amount of work. At least I couldn't.

Is there a way that errstart() and/or errfinish() can know enough
about the state of the communication with the frontend to decide
whether to suppress edata->output_to_client? In other words, instead
of explicitly passing in a flag that says whether to inform the
client, it would be better for the error-reporting machinery to
intrinsically know whether it's right to send_message_to_frontend().
Otherwise, an error thrown from an unexpected location might not have
the flag set correctly.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-15 14:44:39 Re: Default mode for shutdown
Previous Message Tom Lane 2010-12-15 14:39:12 Re: Default mode for shutdown