Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext - Mailing list pgsql-hackers

From Mihail Nikalayeu
Subject Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Date
Msg-id CADzfLwUpXJ+Vn_Wm-wKC5a8qJut+j_tnXhLF_1kH9HXFKsoHFg@mail.gmail.com
Whole thread Raw
In response to Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext  (Mihail Nikalayeu <mihailnikalayeu@gmail.com>)
List 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 :)

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Avoid resource leak (src/test/modules/test_binaryheap/test_binaryheap.c)
Next
From: Robert Haas
Date:
Subject: Re: RFC: extensible planner state