Re: [PATCH] V3: Idle in transaction cancellation

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] V3: Idle in transaction cancellation
Дата
Msg-id AANLkTingz_VF7JKc5A+EoXPjsiXdTnRJXHDiyAcsKW6d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] V3: Idle in transaction cancellation  (Andres Freund <andres@anarazel.de>)
Ответы Re: [PATCH] V3: Idle in transaction cancellation  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Oct 30, 2010 at 4:49 AM, Andres Freund <andres@anarazel.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.

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.

Assuming that works at all, it would presumably mean that the client
would thereafter get something like this:

current transaction is aborted, commands ignored until end of transaction block

...which might be thought unhelpful.  But that could be fixed either
by modifying errdetail_abort() or perhaps even by abstracting the
"current transaction is aborted, commands..." message into a function
that could produce an entirely different message if on either the
first or all calls within a given transaction.

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.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: James William Pye
Дата:
Сообщение: Re: hstores in pl/python
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: ALTER TABLE ... REPLACE WITH