Re: Possible segfault when sending notification within a ProcessUtility hook

From: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible segfault when sending notification within a ProcessUtility hook
Date: 2023-12-06 13:20:37
Message-ID: CAO6_Xqr9wS4uGOzpaHKXA5BaJZoVHu6Gy8N_WZctKHf1jF49EQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Tue, Dec 5, 2023 at 9:03 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Why should we regard that as anything other than a bug in the
> ProcessUtility hook? A failed transaction should not send any
> notifies.

Fair point. That was also my initial assumption but I thought that the
transaction
state was not available from a hook as I've missed
IsAbortedTransactionBlockState.

I will rely on IsAbortedTransactionBlockState to avoid this case,
thanks for the input.

Regards,
Anthonin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-12-06 13:22:07 Re: SQL:2011 application time
Previous Message Robert Haas 2023-12-06 13:11:32 Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)