1. 04 Mar, 2017 5 commits
  2. 03 Mar, 2017 10 commits
  3. 02 Mar, 2017 6 commits
  4. 01 Mar, 2017 11 commits
  5. 28 Feb, 2017 2 commits
  6. 27 Feb, 2017 6 commits
    • Tom Lane's avatar
      Allow index AMs to return either HeapTuple or IndexTuple format during IOS. · 9b88f27c
      Tom Lane authored
      Previously, only IndexTuple format was supported for the output data of
      an index-only scan.  This is fine for btree, which is just returning a
      verbatim index tuple anyway.  It's not so fine for SP-GiST, which can
      return reconstructed data that's much larger than a page.
      
      To fix, extend the index AM API so that index-only scan data can be
      returned in either HeapTuple or IndexTuple format.  There's other ways
      we could have done it, but this way avoids an API break for index AMs
      that aren't concerned with the issue, and it costs little except a couple
      more fields in IndexScanDescs.
      
      I changed both GiST and SP-GiST to use the HeapTuple method.  I'm not
      very clear on whether GiST can reconstruct data that's too large for an
      IndexTuple, but that seems possible, and it's not much of a code change to
      fix.
      
      Per a complaint from Vik Fearing.  Reviewed by Jason Li.
      
      Discussion: https://postgr.es/m/49527f79-530d-0bfe-3dad-d183596afa92@2ndquadrant.fr
      9b88f27c
    • Robert Haas's avatar
      hash: Refactor overflow page allocation. · 30df93f6
      Robert Haas authored
      As with commit b0f18cb7, the goal
      here is to move all of the related page modifications to a single
      section of code, in preparation for adding write-ahead logging.
      
      Amit Kapila, with slight changes by me.  The larger patch series
      of which this is a part has been reviewed and tested by Álvaro
      Herrera, Ashutosh Sharma, Mark Kirkwood, Jeff Janes, and Jesper
      Pedersen, all of whom should also have been credited in the
      previous commit message.
      30df93f6
    • Robert Haas's avatar
      hash: Refactor bucket squeeze code. · b0f18cb7
      Robert Haas authored
      In preparation for adding write-ahead logging to hash indexes,
      refactor _hash_freeovflpage and _hash_squeezebucket so that all
      related page modifications happen in a single section of code.  The
      previous coding assumed that it would be fine to move tuples one at a
      time, and also that the various operations involved in freeing an
      overflow page didn't necessarily all need to be done together, all
      of which is true if you don't care about write-ahead logging.
      
      Amit Kapila, with slight changes by me.
      b0f18cb7
    • Tom Lane's avatar
      Remove PL/Tcl's "module" facility. · 817f2a58
      Tom Lane authored
      PL/Tcl has long had a facility whereby Tcl code could be autoloaded from
      a database table named "pltcl_modules".  However, nobody is using it, as
      evidenced by the recent discovery that it's never been fixed to work with
      standard_conforming_strings turned on.  Moreover, it's rather shaky from
      a security standpoint, and the table design is very old and crufty (partly
      because it dates from before we had TOAST).  A final problem is that
      because the table-population scripts depend on the Tcl client library
      Pgtcl, which we removed from the core distribution in 2004, it's
      impossible to create a self-contained regression test for the feature.
      Rather than try to surmount these problems, let's just remove it.
      
      A follow-on patch will provide a way to execute user-defined
      initialization code, similar to features that exist in plperl and plv8.
      With that, it will be possible to implement this feature or similar ones
      entirely in userspace, which is where it belongs.
      
      Discussion: https://postgr.es/m/22067.1488046447@sss.pgh.pa.us
      817f2a58
    • Peter Eisentraut's avatar
      chomp PQerrorMessage() in backend uses · 2ed193c9
      Peter Eisentraut authored
      PQerrorMessage() returns an error message with a trailing newline, but
      in backend use (dblink, postgres_fdw, libpqwalreceiver), we want to have
      the error message without that for emitting via ereport().  To simplify
      that, add a function pchomp() that returns a pstrdup'ed string with the
      trailing newline characters removed.
      2ed193c9
    • Andres Freund's avatar
      Use the new "Slab" context for some allocations in reorderbuffer.h. · 9fab40ad
      Andres Freund authored
      Note that this change alone does not yet fully address the performance
      problems triggering this work, a large portion of the slowdown is
      triggered by the tuple allocator, which isn't converted to the new
      allocator.  It would be possible to do so, but using evenly sized
      objects, like both the current implementation in reorderbuffer.c and
      slab.c, wastes a fair amount of memory.  A later patch by Tomas will
      introduce a better approach.
      
      Author: Tomas Vondra
      Reviewed-By: Andres Freund
      Discussion: https://postgr.es/m/d15dff83-0b37-28ed-0809-95a5cc7292ad@2ndquadrant.com
      9fab40ad