From fce3b26e97ca98de054734e2af7d9125661a9b3f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 24 Apr 2023 13:01:33 -0400 Subject: Rename ExecAggTransReparent, and improve its documentation. The name of this function suggests that it ought to reparent R/W expanded objects to be children of the persistent aggcontext, instead of copying them. In fact it does no such thing, and if you try to make it do so you will see multiple regression failures. Rename it to the less-misleading ExecAggCopyTransValue, and add commentary about why that attractive-sounding optimization won't work. Also adjust comments at call sites, some of which were describing logic that has since been moved into ExecAggCopyTransValue. Discussion: https://postgr.es/m/3004282.1681930251@sss.pgh.pa.us --- src/backend/jit/llvm/llvmjit_expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/jit/llvm/llvmjit_expr.c') diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c index daefe66f40a..a1b33d6e6cf 100644 --- a/src/backend/jit/llvm/llvmjit_expr.c +++ b/src/backend/jit/llvm/llvmjit_expr.c @@ -2314,7 +2314,7 @@ llvm_compile_expr(ExprState *state) params[5] = LLVMBuildTrunc(b, v_transnull, TypeParamBool, ""); - v_fn = llvm_pg_func(mod, "ExecAggTransReparent"); + v_fn = llvm_pg_func(mod, "ExecAggCopyTransValue"); v_newval = LLVMBuildCall(b, v_fn, params, lengthof(params), -- cgit v1.2.3