Re: WIP: Faster Expression Processing v4
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2017-03-20T06:25:11Z
Lists: pgsql-hackers
Attachments
- 0001-Add-some-basic-nodeTidscan.c-tests.patch.gz (application/x-patch-gzip) patch 0001
- 0002-Make-get_last_attnums-more-generic.patch.gz (application/x-patch-gzip) patch 0002
- 0003-Add-configure-test-for-computed-goto-support.patch.gz (application/x-patch-gzip) patch 0003
- 0004-Faster-expression-evaluation-and-targetlist-projecti.patch.gz (application/x-patch-gzip) patch 0004
Hi, On 2017-03-15 20:09:03 -0400, Tom Lane wrote: > I think it would be worth creating a README file giving an overview > of how all of this patch is supposed to work. You also need to do a > whole lot more work on the function-level comments. I tried to improve upon both fronts. I've added the higher level explanation to executor/README, but I don't feel very strong about that. I'm not quite sure it's exactly what you wanted however, the above ask could also be understood to have more of an motivational angle, describing why and what exactly is changed? I'm also still not sure how understandable it's for anybody that hasn't had their head in this for a while... I've also, as discussed nearby, re-added code akin to the checks in ExecEvalScalarVar, with the discussed adjustment of the opcodes for later executions. Now that I've done that, I'm not sure I like that approach that much - another alternative would be to change an ExprState's evalfunc to ExecCheckAndExecute() after initialization. That'd have the advantage to work nicely for JIT. Either way, that can trivially be changed later. Additionally I added a regression test for the nearly entirely untested nodeTidscan.c, after I'd broken it previously without noticing (thanks Andreas). I started a run through valgrind, without complaints up to create_function_2. Can't run all of it (and contrib) right now without prematurely running out of power on a plane. Did I understand correctly that you'd rather just merge ExecGetLastAttnums into execExpr.c, instead of making it globally available? Greetings, Andres Freund
Commits
-
Improve performance of ExecEvalWholeRowVar.
- 2f0903ea1965 10.0 landed
-
Remove unreachable code in expression evaluation.
- ad46a2aa79f9 10.0 landed
-
Faster expression evaluation and targetlist projection.
- b8d7f053c5c2 10.0 landed
-
Avoid syntax error on platforms that have neither LOCALE_T nor ICU.
- 457a44487328 10.0 cited
-
Add configure test to see if the C compiler has gcc-style computed gotos.
- bc18126a6bcb 10.0 landed
-
Improve regression test coverage for TID scanning.
- be6c3d19fd45 10.0 landed
-
Improve expression evaluation test coverage.
- ce38949ba23a 10.0 landed
-
Fix two errors with nested CASE/WHEN constructs.
- f0c7b789ab12 9.6.0 cited