!6129 [VACUUM] 修复tidstore在disable_memory_stats开启时core的问题

Merge pull request !6129 from tino247/master
This commit is contained in:
opengauss_bot
2024-08-26 09:27:20 +00:00
committed by Gitee

View File

@ -172,8 +172,13 @@ TidStoreCreateLocal(size_t max_bytes, bool insert_only)
*
* STACK_CONTEXT can reduce memory bloat problem for
* such a multi small memory allocation scene.
*
* Since disable_memory_stats = on is suitable for
* STANDARD_CONTEXT only, STACK_CONTEXT won't be used
* when such a switch is on.
*/
MemoryContextType type = insert_only ? STACK_CONTEXT : STANDARD_CONTEXT;
MemoryContextType type = (insert_only && !g_instance.attr.attr_memory.disable_memory_stats) ?
STACK_CONTEXT : STANDARD_CONTEXT;
ts->rt_context = AllocSetContextCreate(CurrentMemoryContext,
"TID storage",
minContextSize,