Re: Possible segfault when sending notification within a ProcessUtility hook - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Possible segfault when sending notification within a ProcessUtility hook
Date
Msg-id 955685.1701806638@sss.pgh.pa.us
Whole thread Raw
In response to Possible segfault when sending notification within a ProcessUtility hook  (Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>)
Responses Re: Possible segfault when sending notification within a ProcessUtility hook
List pgsql-hackers
Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: backtrace_on_internal_error
Next
From: Nathan Bossart
Date:
Subject: Re: backtrace_on_internal_error