Re: No Callbacks on FATAL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: No Callbacks on FATAL
Date
Msg-id 782965.1673486247@sss.pgh.pa.us
Whole thread Raw
In response to Re: No Callbacks on FATAL  (Andres Freund <andres@anarazel.de>)
Responses Re: No Callbacks on FATAL
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2023-01-11 18:10:33 -0500, Tom Lane wrote:
>> It's intended behavior, and I seriously doubt that it ever worked
>> differently.

> Hm? MemoryContextDelete() unconditionally calls the
> callbacks. ShutdownPostgres() calls AbortOutOfAnyTransaction(). So if there's
> an ongoing transaction, we'll call the reset callbacks on TopMemoryContext and
> its children.

Hmm ... I'd forgotten that we'd reach AbortOutOfAnyTransaction in
the FATAL code path.  It does seem like any memory contexts below
TopTransactionContext ought to get cleaned up then.

As you say, we really need more details to see what's happening
here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: on placeholder entries in view rule action query's range table
Next
From: Peter Geoghegan
Date:
Subject: Re: Reducing the WAL overhead of freezing in VACUUM by deduplicating per-tuple freeze plans