Re: "cancelling statement due to user request error" occurs but the transaction has committed.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: "cancelling statement due to user request error" occurs but the transaction has committed.
Дата
Msg-id 20150319225516.GB20462@momjian.us
обсуждение исходный текст
Ответ на Re: "cancelling statement due to user request error" occurs but the transaction has committed.  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: "cancelling statement due to user request error" occurs but the transaction has committed.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Mar 19, 2015 at 04:36:38PM -0400, Robert Haas wrote:
> On Thu, Mar 19, 2015 at 10:23 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > First attached patch is more surgical and clears a possible cancel
> > request before we report the query duration in the logs --- this doesn't
> > affect any after triggers that might include CHECK_FOR_INTERRUPTS()
> > calls we want to honor.
> >
> > Another approach would be to have CommitTransaction() clear any pending
> > cancel before it calls RESUME_INTERRUPTS().  The second attached patch
> > takes that approach, and also works.
>
> So, either way, what happens if the query cancel shows up just an
> instant after you clear the flag?

Oh, good point.  This version handles that case addressing only the
log_duration* block.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: proposal: doc: simplify examples of dynamic SQL
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: proposal: doc: simplify examples of dynamic SQL