No Callbacks on FATAL

From: Ed Behn <ed(at)behn(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: No Callbacks on FATAL
Date: 2023-01-11 22:47:28
Message-ID: CAJBL5DP16D-6nsW2XMVx8DUgJ9yGfbUCe7JL8ZszWZzTa_wJmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm developing a module that implements Haskell as a procedural language (
https://www.postgresql.org/about/news/plhaskell-v10-released-2519/)

I'm using a callback function that is called when a memory context is
deleted to remove a temporary file. This works fine when the transaction
ends normally or raises an ERROR. However, when a FATAL event happens, the
callback is not run. Is this a bug or intended behaviour? I think that this
is a new behavior and that the callback was called in an earlier version
(perhaps v14) when I was originally developing this code. I'm running
v15.1.

It seems to me that callbacks should be run in the event of a FATAL event
in order to clean up any lingering issues.
-Ed

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-01-11 22:51:37 Re: Add SHELL_EXIT_CODE to psql
Previous Message Peter Geoghegan 2023-01-11 22:29:25 Re: pgsql: Delay commit status checks until freezing executes.