aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-03-28 15:07:08 -0700
committerAndres Freund <andres@anarazel.de>2018-03-28 15:07:08 -0700
commita0a08c1d85dae3c332e7d72a56df0636be9c5d0a (patch)
treeef20ed243d620abbeee6041c42c04c7d32f5e7e0
parente6c039d13e16a3a2dec5ba479d9d1fb3229c03a3 (diff)
downloadpostgresql-a0a08c1d85dae3c332e7d72a56df0636be9c5d0a.tar.gz
postgresql-a0a08c1d85dae3c332e7d72a56df0636be9c5d0a.zip
Fix mistakes in the just added JIT docs.
Reported-By: Lukas Fittl Author: Andres Freund
-rw-r--r--doc/src/sgml/config.sgml2
-rw-r--r--doc/src/sgml/jit.sgml4
-rw-r--r--src/backend/jit/README14
3 files changed, 13 insertions, 7 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index dc9ed22eb41..e7d408824e2 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7498,7 +7498,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
used. The built-in default is <literal>llvmjit</literal>.
</para>
<para>
- If set to a non-existent library <acronym>JIT</acronym> will not
+ If set to a non-existent library <acronym>JIT</acronym> will not be
available, but no error will be raised. This allows JIT support to be
installed separately from the main
<productname>PostgreSQL</productname> package.
diff --git a/doc/src/sgml/jit.sgml b/doc/src/sgml/jit.sgml
index f59e4923e14..ece259b5b4b 100644
--- a/doc/src/sgml/jit.sgml
+++ b/doc/src/sgml/jit.sgml
@@ -32,9 +32,9 @@
</para>
<para>
- <productname>PostgreSQL</productname> has builtin support perform
+ <productname>PostgreSQL</productname> has builtin support to perform
<acronym>JIT</acronym> using <ulink
- url="https://llvm.org/"><productname>LLVM</productname></ulink> when built
+ url="https://llvm.org/"><productname>LLVM</productname></ulink> when
<productname>PostgreSQL</productname> was built with
<literal>--with-llvm</literal> (see <xref linkend="configure-with-llvm"/>).
</para>
diff --git a/src/backend/jit/README b/src/backend/jit/README
index b37dcbe0c16..bfed319189c 100644
--- a/src/backend/jit/README
+++ b/src/backend/jit/README
@@ -74,7 +74,7 @@ the shared library providing JIT support can be loaded (i.e. postgres
was compiled with LLVM support and the shared library is installed),
the task of JIT compiling an expression gets handed of to shared
library. This obviously requires that the function in jit.c is allowed
-to fail in case not JIT provider can be loaded.
+to fail in case no JIT provider can be loaded.
Which shared library is loaded is determined by the jit_provider GUC,
defaulting to "llvmjit".
@@ -174,7 +174,7 @@ least a few postgres types. While it is possible to inform LLVM about
type definitions by recreating them manually in C code, that is failure
prone and labor intensive.
-Instead the is one small file (llvmjit_types.c) which references each of
+Instead there is one small file (llvmjit_types.c) which references each of
the types required for JITing. That file is translated to bitcode at
compile time, and loaded when LLVM is initialized in a backend.
@@ -232,10 +232,16 @@ an ExprState, rather than absolute pointers into memory.
Once that is addressed, adding an LRU cache that's keyed by the
generated LLVM IR will allow to use optimized functions even for
-shorter functions.
+faster queries.
A longer term project is to move expression compilation to the planner
-stage, allowing to tie
+stage, allowing e.g. to tie compiled expressions to prepared
+statements.
+
+An even more advanced approach would be to use JIT with few
+optimizations initially, and build an optimized version in the
+background. But that's even further off.
+
What to JIT
===========