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