Re: [BUGS] BUG #14808: V10-beta4, backend abort

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14808: V10-beta4, backend abort
Дата
Msg-id 13984.1505157880@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14808: V10-beta4, backend abort  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Sep 9, 2017 at 1:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> My first instinct is to get rid of DestroyTransitionCaptureState
>> altogether, on the grounds that the TransitionCaptureState will
>> go away at transaction cleanup and we can't really get rid of it
>> any sooner than that.

> End of transaction, or end of query?  I'm not sure what happens when
> triggers are deferred, but I think there are a lot of cases when we
> want to throw away the tuplestore immediately, not hold on to it for
> the rest of the transaction.

As things stand, it's end of subtransaction, because the TCSes
are allocated in CurTransactionContext.  See the argument in
MakeTransitionCaptureState.

And yes, this is inefficient.  The quick-hack patch I committed yesterday
only pays the price if you have RI triggers cascading changes into a table
that also has triggers-with-transition-tables, but I can certainly believe
that it could get expensive in such a case.

The fix proposal discussed downthread should fix the inefficiency as well
as the spec compliance problem.  But personally I'm far more worried about
the latter.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [BUGS] BUG #14808: V10-beta4, backend abort
Следующее
От: serovov@gmail.com
Дата:
Сообщение: [BUGS] BUG #14811: Nested IN SUBQERY that returns empty results executedmultiple times.