Basic JIT provider and error handling infrastructure

Enterprise / PostgreSQL - Andres Freund [anarazel.de] - 22 March 2018 02:28 EDT

This commit introduces:

1) JIT provider abstraction, which allows JIT functionality to be implemented in separate shared libraries. That's desirable because it allows to install JIT support as a separate package, and because it allows experimentation with different forms of JITing. 2) JITContexts which can be, using functions introduced in follow up commits, used to emit JITed functions, and have them be cleaned up on error. 3) The outline of a LLVM JIT provider, which will be fleshed out in subsequent commits.

Documentation for GUCs added, and for JIT in general, will be added in later commits.

Author: Andres Freund, with architectural input from Jeff Davis Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de

432bb9e04d Basic JIT provider and error handling infrastructure.
src/Makefile | 4 +
src/backend/Makefile | 3 +-
src/backend/jit/Makefile | 22 ++++
src/backend/jit/jit.c | 156 ++++++++++++++++++++++++++
src/backend/jit/llvm/Makefile | 55 +++++++++
src/backend/jit/llvm/llvmjit.c | 113 +++++++++++++++++++
src/backend/jit/llvm/llvmjit_error.cpp | 141 +++++++++++++++++++++++
src/backend/tcop/postgres.c | 3 +
src/backend/utils/misc/guc.c | 22 ++++
src/backend/utils/misc/postgresql.conf.sample | 2 +
src/backend/utils/resowner/resowner.c | 48 ++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +
src/include/jit/jit.h | 46 ++++++++
src/include/jit/llvmjit.h | 51 +++++++++
src/include/utils/resowner_private.h | 7 ++
src/tools/pgindent/exclude_file_patterns | 1 +
src/tools/pgindent/typedefs.list | 3 +
18 files changed, 679 insertions(+), 2 deletions(-)

Upstream: git.postgresql.org


  • Share