Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> writes:
> This happens when a transaction block fails and a ProcessUtility hook
> sends a notification during the rollback command.
Why should we regard that as anything other than a bug in the
ProcessUtility hook? A failed transaction should not send any
notifies.
> Moving notification clean up from AbortTransaction to CleanupTransaction fixes
> the issue as it will clear pendingActions in the same function that destroys the
> TopTransactionContext.
Maybe that would be okay, or maybe not, but I'm disinclined to
mess with it without a better argument for changing it. It seems
like there would still be room to break things with mistimed
calls to async.c functions.
regards, tom lane