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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14808: V10-beta4, backend abort
Дата
Msg-id 3702.1504976930@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14808: V10-beta4, backend abort  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [BUGS] BUG #14808: V10-beta4, backend abort  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [BUGS] BUG #14808: V10-beta4, backend abort  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> Crash is confirmed here so I am adding an open item. I have not dug
> into the issue seriously, but at short glance we have a code path
> trying to access something that has already been free'd:

I think this can be blamed on commit c46c0e52.

What is happening is that the AFTER triggers are queuing more triggers,
which have TransitionCaptureStates associated, but 
ExecEndModifyTable thinks it can DestroyTransitionCaptureState
unconditionally.  When the subsidiary triggers eventually get executed,
their ats_transition_capture pointers are pointing at garbage.

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.

The other question that seems pretty relevant is why the subsidiary
triggers, which are the constraint triggers associated with the
tables' foreign keys, are getting queued with TransitionCaptureState
pointers in the first place.  This seems horridly expensive and
unnecessary.  It also directly contradicts the claim in
MakeTransitionCaptureState that constraint triggers cannot have
transition tables.
        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 по дате отправления:

Предыдущее
От: Keith
Дата:
Сообщение: Re: [BUGS] BUG #14804: Postgres user lost his superuser authority
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14809: Heap Corruption with deeply nested triggers.