Re: Xact end leaves CurrentMemoryContext = TopMemoryContext - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Xact end leaves CurrentMemoryContext = TopMemoryContext
Date
Msg-id 4189339.1718743698@sss.pgh.pa.us
Whole thread Raw
In response to Re: Xact end leaves CurrentMemoryContext = TopMemoryContext  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I wonder if there's an argument the "persistent" TopTransactionContext should
> live under a different name outside of transactions, to avoid references to it
> working in a context where it's not valid?   It's probably not worth it, but
> not sure.

Hm.  We could stash the long-lived pointer in a static variable,
and only install it in TopTransactionContext when you're supposed
to use it.  I tend to agree not worth it, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: allow changing autovacuum_max_workers without restarting
Next
From: Nathan Bossart
Date:
Subject: Re: allow changing autovacuum_max_workers without restarting