Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 12fb189

Browse files
committed
Fix RELCACHE_FORCE_RELEASE issue
Introduced by 83fd453. To fix, the tuple descriptors need to be copied into the current memory context. Discussion: https://www.postgresql.org/message-id/04d78603-edae-9243-9dde-fe3037176a7d@2ndquadrant.com
1 parent 5a1d0c9 commit 12fb189

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/replication/pgoutput/pgoutput.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ maybe_send_schema(LogicalDecodingContext *ctx,
305305

306306
/* Map must live as long as the session does. */
307307
oldctx = MemoryContextSwitchTo(CacheMemoryContext);
308-
relentry->map = convert_tuples_by_name(indesc, outdesc);
308+
relentry->map = convert_tuples_by_name(CreateTupleDescCopy(indesc),
309+
CreateTupleDescCopy(outdesc));
309310
MemoryContextSwitchTo(oldctx);
310311
send_relation_and_attrs(ancestor, ctx);
311312
RelationClose(ancestor);

0 commit comments

Comments
 (0)