From 938efce242ba0cfe18974ef522651ec21d963f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Nordstr=C3=B6m?= Date: Sun, 20 Oct 2024 15:14:15 +0200 Subject: [PATCH] Use PortalContext for conversion --- tsl/src/hypercore/hypercore_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsl/src/hypercore/hypercore_handler.c b/tsl/src/hypercore/hypercore_handler.c index 7a5bdf02638..2b24ff1b793 100644 --- a/tsl/src/hypercore/hypercore_handler.c +++ b/tsl/src/hypercore/hypercore_handler.c @@ -3316,9 +3316,9 @@ convert_to_hypercore(Oid relid) return; } - MemoryContext oldcxt = MemoryContextSwitchTo(CacheMemoryContext); - ConversionState *state = palloc0(sizeof(ConversionState)); CompressionSettings *settings = ts_compression_settings_get(hsinfo->compressed_relid); + MemoryContext oldcxt = MemoryContextSwitchTo(PortalContext); + ConversionState *state = palloc0(sizeof(ConversionState)); state->before_size = ts_relation_size_impl(relid); state->tuplesortstate = compression_create_tuplesort_state(settings, relation); Assert(state->tuplesortstate);