1. 31 Mar, 2018 4 commits
  2. 30 Mar, 2018 13 commits
  3. 29 Mar, 2018 16 commits
  4. 28 Mar, 2018 7 commits
    • Peter Eisentraut's avatar
      Allow committing inside cursor loop · 056a5a3f
      Peter Eisentraut authored
      Previously, committing or aborting inside a cursor loop was prohibited
      because that would close and remove the cursor.  To allow that,
      automatically convert such cursors to holdable cursors so they survive
      commits or rollbacks.  Portals now have a new state "auto-held", which
      means they have been converted automatically from pinned.  An auto-held
      portal is kept on transaction commit or rollback, but is still removed
      when returning to the main loop on error.
      
      This supports all languages that have cursor loop constructs: PL/pgSQL,
      PL/Python, PL/Perl.
      Reviewed-by: default avatarIldus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
      056a5a3f
    • Bruce Momjian's avatar
      C comment: fix typo, log -> lag · a2894cce
      Bruce Momjian authored
      Reported-by: atorikoshi
      
      Discussion: https://postgr.es/m/b61f2ab9-c0e0-d33d-ce3f-42a228025681@lab.ntt.co.jp
      
      Author: atorikoshi
      a2894cce
    • Andres Freund's avatar
      Fix mistakes in the just added JIT docs. · a0a08c1d
      Andres Freund authored
      Reported-By: Lukas Fittl
      Author: Andres Freund
      a0a08c1d
    • Andres Freund's avatar
      Add documentation for the JIT feature. · e6c039d1
      Andres Freund authored
      As promised in earlier commits, this adds documentation about the new
      build options, the new GUCs, about the planner logic when JIT is used,
      and the benefits of JIT in general.
      
      Also adds a more implementation oriented README.
      
      I'm sure we're going to want to expand this further, but I think this
      is a reasonable start.
      
      Author: Andres Freund, with contributions by Thomas Munro
      Reviewed-By: Thomas Munro
      Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
      e6c039d1
    • Andres Freund's avatar
      Add EXPLAIN support for JIT. · 1f0c6a9e
      Andres Freund authored
      This just shows a few details about JITing, e.g. how many functions
      have been JITed, and how long that took.  To avoid noise in regression
      tests with functions sometimes being JITed in --with-llvm builds,
      disable display when COSTS OFF is specified.
      
      Author: Andres Freund
      Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
      1f0c6a9e
    • Andres Freund's avatar
      Add inlining support to LLVM JIT provider. · 9370462e
      Andres Freund authored
      This provides infrastructure to allow JITed code to inline code
      implemented in C. This e.g. can be postgres internal functions or
      extension code.
      
      This already speeds up long running queries, by allowing the LLVM
      optimizer to optimize across function boundaries. The optimization
      potential currently doesn't reach its full potential because LLVM
      cannot optimize the FunctionCallInfoData argument fully away, because
      it's allocated on the heap rather than the stack. Fixing that is
      beyond what's realistic for v11.
      
      To be able to do that, use CLANG to convert C code to LLVM bitcode,
      and have LLVM build a summary for it. That bitcode can then be used to
      to inline functions at runtime. For that the bitcode needs to be
      installed. Postgres bitcode goes into $pkglibdir/bitcode/postgres,
      extensions go into equivalent directories.  PGXS has been modified so
      that happens automatically if postgres has been compiled with LLVM
      support.
      
      Currently this isn't the fastest inline implementation, modules are
      reloaded from disk during inlining. That's to work around an apparent
      LLVM bug, triggering an apparently spurious error in LLVM assertion
      enabled builds.  Once that is resolved we can remove the superfluous
      read from disk.
      
      Docs will follow in a later commit containing docs for the whole JIT
      feature.
      
      Author: Andres Freund
      Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
      9370462e
    • Andres Freund's avatar
      Use isinf builtin for clang, for performance. · 8a934d67
      Andres Freund authored
      When compiling with clang glibc's definition of isinf() ends up
      leading to and external libc function call. That's because there was a
      bug in the builtin in an old gcc version, and clang claims
      compatibility with an older version.  That causes clang to be
      measurably slower for floating point heavy workloads than gcc.
      
      To fix simply redirect isinf when using clang and clang confirms it
      has __builtin_isinf().
      8a934d67