File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/backend/access/transam Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -744,13 +744,14 @@ read_rel(StringInfo s, LOCKMODE mode)
744
744
old_context = MemoryContextSwitchTo (TopMemoryContext );
745
745
pglogical_relid_map_put (remote_relid , local_relid );
746
746
MemoryContextSwitchTo (old_context );
747
+ return heap_open (local_relid , NoLock );
747
748
} else {
748
749
nspnamelen = pq_getmsgbyte (s );
749
750
s -> cursor += nspnamelen ;
750
751
relnamelen = pq_getmsgbyte (s );
751
752
s -> cursor += relnamelen ;
753
+ return heap_open (local_relid , mode );
752
754
}
753
- return heap_open (local_relid , NoLock );
754
755
}
755
756
756
757
static void
Original file line number Diff line number Diff line change @@ -2616,6 +2616,7 @@ GetLoggedPreparedXactState(char const *gid)
2616
2616
GetOldestRestartPoint (& start_lsn , & timeline );
2617
2617
if (start_lsn != InvalidXLogRecPtr )
2618
2618
{
2619
+ MemoryContext memctx = CurrentMemoryContext ;
2619
2620
xlogreader = XLogReaderAllocate (& read_local_xlog_page , NULL );
2620
2621
if (!xlogreader )
2621
2622
ereport (ERROR ,
@@ -2732,6 +2733,7 @@ GetLoggedPreparedXactState(char const *gid)
2732
2733
FlushErrorState ();
2733
2734
}
2734
2735
PG_END_TRY ();
2736
+ MemoryContextSwitchTo (memctx );
2735
2737
XLogReaderFree (xlogreader );
2736
2738
}
2737
2739
You can’t perform that action at this time.
0 commit comments