From 432bb9e04da4d4a1799b1fe7c723b975cb070c43 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 21 Mar 2018 19:28:28 -0700 Subject: Basic JIT provider and error handling infrastructure. 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 --- src/backend/tcop/postgres.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 6dc2095b9a7..f7aa4a74844 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -42,6 +42,7 @@ #include "catalog/pg_type.h" #include "commands/async.h" #include "commands/prepare.h" +#include "jit/jit.h" #include "libpq/libpq.h" #include "libpq/pqformat.h" #include "libpq/pqsignal.h" @@ -3950,6 +3951,8 @@ PostgresMain(int argc, char *argv[], /* We also want to cleanup temporary slots on error. */ ReplicationSlotCleanup(); + jit_reset_after_error(); + /* * Now return to normal top-level context and clear ErrorContext for * next time. -- cgit v1.2.3