Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: cbw <cbwhitebu(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever
Date: 2020-04-21 15:19:35
Message-ID: 20200421151935.GA18772@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2020-Apr-21, Tom Lane wrote:

> A variant of that theory is that foreign key trigger firings are being
> skipped in one case but not the other; but offhand I think those
> optimizations only apply to update/delete cases not inserts. Anyway
> that still requires some assumptions about moving parts that you
> haven't shown us.

I wonder if there are any funny interactions between trigger tuple
acquisition and the ON CONFLICT stuff. The only thing that occurs to me
to explain the fact that it only fails with the two stmts in the DO
block is that the second insert can see rows as inserted by the same
transaction.

I would start by taking a few dozen backtraces and comparing them to see
if any progress is being made.

The fact that this reproduces in 11.2 would seem to discard theories
about tuple table slot changes and table AM.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-04-21 15:37:08 Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever
Previous Message cbw 2020-04-21 15:13:46 Re: Backend stuck in tirigger.c:afterTriggerInvokeEvents forever