From 1d139ebbf43eec9b743d9f04b07a4c44342da213 Mon Sep 17 00:00:00 2001 From: Anthonin Bonnefoy Date: Mon, 24 Jun 2024 13:36:39 +0200 Subject: [PATCH] Add missing memory context switch --- src/pg_tracing_otel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pg_tracing_otel.c b/src/pg_tracing_otel.c index 73af683..7300c93 100644 --- a/src/pg_tracing_otel.c +++ b/src/pg_tracing_otel.c @@ -150,6 +150,7 @@ send_spans_to_otel_collector(OtelContext * octx) { LWLockRelease(pg_tracing_shared_state->lock); MemoryContextReset(marshal_mem_ctx); + MemoryContextSwitchTo(otel_exporter_mem_ctx); free(qbuffer); return; }