Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Mihail Nikalayeu <mihailnikalayeu@gmail.com>
From: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
To: Antonin Houska <ah@cybertec.at>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-12T22:57:52Z
Lists: pgsql-hackers
Hi!
> Hello, Antonin!
>
> if (using_subtxn)
> {
> RollbackAndReleaseCurrentSubTransaction();
> MemoryContextSwitchTo(ccxt);
> CurrentResourceOwner = cowner;
> }
>
> IIUC memory context is already switched above:
>
> MemoryContext ecxt = MemoryContextSwitchTo(ccxt);
>
Finally realized RollbackAndReleaseCurrentSubTransaction leaves as
with TransactionAbortContext, so, nevermind :)
Commits
-
Avoid unexpected changes of CurrentResourceOwner and CurrentMemoryContext
- 7dcea51c2a4d 19 (unreleased) landed