Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-20 Thread Mihail Nikalayeu
Hi! > Hello, Antonin! > > if (using_subtxn) > { >RollbackAndReleaseCurrentSubTransaction(); >MemoryContextSwitchTo(ccxt); >CurrentResourceOwner = cowner; > } > > IIUC memory context is already switched above: > > MemoryContext ecxt = MemoryContextSwitchTo(cc

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-17 Thread Álvaro Herrera
On 2025-Sep-12, Antonin Houska wrote: > Euler Taveira wrote: > > > Interesting. I'm wondering that if this patch is applied we could remove the > > following code [...] from pg_logical_slot_get_changes_guts and > > LogicalSlotAdvanceAndCheckSnapState functions too. IIUC the referred > > code is

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-12 Thread Antonin Houska
Álvaro Herrera wrote: > On 2025-Sep-12, Antonin Houska wrote: > > > Euler Taveira wrote: > > > > > Interesting. I'm wondering that if this patch is applied we could remove > > > the > > > following code [...] from pg_logical_slot_get_changes_guts and > > > LogicalSlotAdvanceAndCheckSnapState

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-11 Thread Antonin Houska
Euler Taveira wrote: > On Thu, Sep 11, 2025, at 3:05 PM, Álvaro Herrera wrote: > > On 2025-Sep-03, Antonin Houska wrote: > > > >> When working on the REPACK command, we see an ERROR caused by unexpected > >> change of CurrentResourceOwner [1]. I think the problem is that > >> reorderbuffer.c does

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-11 Thread Euler Taveira
On Thu, Sep 11, 2025, at 3:05 PM, Álvaro Herrera wrote: > On 2025-Sep-03, Antonin Houska wrote: > >> When working on the REPACK command, we see an ERROR caused by unexpected >> change of CurrentResourceOwner [1]. I think the problem is that >> reorderbuffer.c does not restore the original value aft

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-11 Thread Álvaro Herrera
On 2025-Sep-03, Antonin Houska wrote: > When working on the REPACK command, we see an ERROR caused by unexpected > change of CurrentResourceOwner [1]. I think the problem is that > reorderbuffer.c does not restore the original value after calling > RollbackAndReleaseCurrentSubTransaction(). The at

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-07 Thread Mihail Nikalayeu
Hello, Antonin! if (using_subtxn) { RollbackAndReleaseCurrentSubTransaction(); MemoryContextSwitchTo(ccxt); CurrentResourceOwner = cowner; } IIUC memory context is already switched above: MemoryContext ecxt = MemoryContextSwitchTo(ccxt); Best regards, Mikhai