1. 24 Jan, 2017 8 commits
  2. 23 Jan, 2017 11 commits
  3. 22 Jan, 2017 3 commits
    • Tom Lane's avatar
      Relocate static function declarations to be after typedefs in jsonfuncs.c. · 90992e0e
      Tom Lane authored
      Project style is to put things in this order, for the good and sufficient
      reason that you often need the typedefs in the function declarations.
      There already was one function declaration that needed a typedef, which
      was randomly placed away from all the other static function declarations
      in consequence.  And the submitted patch for better json_populate_record
      functionality jumped through even more hoops in order to preserve this
      bad idea.
      
      This patch only moves lines from point A to point B, no other changes.
      90992e0e
    • Tom Lane's avatar
      Remove no-longer-needed loop in ExecGather(). · 0a8b9d3b
      Tom Lane authored
      Coverity complained quite properly that commit ea15e186 had introduced
      unreachable code into ExecGather(); to wit, it was no longer possible to
      iterate the final for-loop more or less than once.  So remove the for().
      
      In passing, clean up a couple of comments, and make better use of a local
      variable.
      0a8b9d3b
    • Peter Eisentraut's avatar
      Add missing break · 8f164e1e
      Peter Eisentraut authored
      8f164e1e
  4. 21 Jan, 2017 3 commits
    • Peter Eisentraut's avatar
      b4800867
    • Tom Lane's avatar
      Fix cross-shlib linking in temporary installs on HPUX 10. · d2ab1176
      Tom Lane authored
      Turns out this has been broken for years and we'd not noticed.  The one
      case that was getting exercised in the buildfarm, or probably anywhere
      else, was postgres_fdw.sl's reference to libpq.sl; and it turns out that
      that was always going to libpq.sl in the actual installation directory
      not the temporary install.  We'd not noticed because the buildfarm script
      does "make install" before it tests contrib.  However, the recent addition
      of a logical-replication test to the core regression scripts resulted in
      trying to use libpqwalreceiver.sl before "make install" happens, and that
      failed for lack of finding libpq.sl, as shown by failures on buildfarm
      members gaur and pademelon.
      
      There are two changes needed to fix it: the magic environment variable to
      specify shlib search path at runtime is SHLIB_PATH not LD_LIBRARY_PATH,
      and the shlib link command needs to specify the +s switch else the library
      will not honor SHLIB_PATH.
      
      I'm not quite sure why buildfarm members anole and gharial (HPUX 11) didn't
      show the same failure.  Consulting man pages on the web says that HPUX 11
      honors both LD_LIBRARY_PATH and SHLIB_PATH, which would explain half of it,
      and the rather confusing wording I've been able to find suggests that +s
      might effectively be the default in HPUX 11.  But it seems at least as
      likely that there's just a libpq.so installed in /usr/lib on that machine;
      as long as it's not too ancient, that would satisfy the test.  In any case
      I do not think this patch will break HPUX 11.
      
      At the moment I don't see a need to back-patch this, since it only matters
      for testing purposes, not to mention that HPUX 10 is probably dead in the
      real world anyway.
      d2ab1176
    • Peter Eisentraut's avatar
      Move some things from builtins.h to new header files · f21a563d
      Peter Eisentraut authored
      This avoids that builtins.h has to include additional header files.
      f21a563d
  5. 20 Jan, 2017 11 commits
  6. 19 Jan, 2017 4 commits
    • Tom Lane's avatar
      Fix Assert failure induced by commit 215b43cd. · d479e37e
      Tom Lane authored
      I'd somehow talked myself into believing that set_append_rel_size
      doesn't need to worry about getting back an AND clause when it applies
      eval_const_expressions to the result of adjust_appendrel_attrs (that is,
      transposing the appendrel parent's restriction clauses for one child).
      But that is nonsense, and Andreas Seltenreich's fuzz tester soon
      turned up a counterexample.  Put back the make_ands_implicit step
      that was there before, and add a regression test covering the case.
      
      Report: https://postgr.es/m/878tq6vja6.fsf@ansel.ydns.eu
      d479e37e
    • Andres Freund's avatar
      Fix platform dependant regression output triggered by 69f4b9c8. · 18220053
      Andres Freund authored
      Due to the changed costing in that commit hash-aggregates started to
      be used, which results in big-endian vs. little-endian output
      differences.  Disable hash-aggs for those tests.
      
      Author: Andres Freund, with input from Tom Lane
      Discussion: https://postgr.es/m/22891.1484791792@sss.pgh.pa.us
      18220053
    • Andres Freund's avatar
      Remove obsoleted code relating to targetlist SRF evaluation. · ea15e186
      Andres Freund authored
      Since 69f4b9c8 plain expression evaluation (and thus normal projection)
      can't return sets of tuples anymore. Thus remove code dealing with
      that possibility.
      
      This will require adjustments in external code using
      ExecEvalExpr()/ExecProject() - that should neither be hard nor very
      common.
      
      Author: Andres Freund and Tom Lane
      Discussion: https://postgr.es/m/20160822214023.aaxz5l4igypowyri@alap3.anarazel.de
      ea15e186
    • Alvaro Herrera's avatar
      Fix race condition in reading commit timestamps · 8eace46d
      Alvaro Herrera authored
      If a user requests the commit timestamp for a transaction old enough
      that its data is concurrently being truncated away by vacuum at just the
      right time, they would receive an ugly internal file-not-found error
      message from slru.c rather than the expected NULL return value.
      
      In a primary server, the window for the race is very small: the lookup
      has to occur exactly between the two calls by vacuum, and there's not a
      lot that happens between them (mostly just a multixact truncate).  In a
      standby server, however, the window is larger because the truncation is
      executed as soon as the WAL record for it is replayed, but the advance
      of the oldest-Xid is not executed until the next checkpoint record.
      
      To fix in the primary, simply reverse the order of operations in
      vac_truncate_clog.  To fix in the standby, augment the WAL truncation
      record so that the standby is aware of the new oldest-XID value and can
      apply the update immediately.  WAL version bumped because of this.
      
      No backpatch, because of the low importance of the bug and its rarity.
      
      Author: Craig Ringer
      Reviewed-By: Petr Jelínek, Peter Eisentraut
      Discussion: https://postgr.es/m/CAMsr+YFhVtRQT1VAwC+WGbbxZZRzNou=N9Ed-FrCqkwQ8H8oJQ@mail.gmail.com
      8eace46d