1. 29 6月, 2016 1 次提交
  2. 28 6月, 2016 7 次提交
  3. 27 6月, 2016 2 次提交
  4. 25 6月, 2016 3 次提交
    • T
      spelling: tabes -> tables · 79224d88
      Tristan Su 提交于
      79224d88
    • S
    • G
      Allocate target's tuple table slot in PortalHeapMemory during split partition · c0e1f00c
      George Caragea 提交于
          When we execute an ALTER TABLE statement that splits default partition into a "New" and a new Default partition, we perform the following 5 steps:
      
           * copy the tuples located in the default partition into a temporary table,
           * drop default partition,
           * create the “New“ partition,
           * create the new DEFAULT partition, and
           * copy all tuples from the temporary table into the newly created partitions.
      
          The last step is executed in split_rows, where for each tuple in the temporary table,
      
           * we determine the target partition/table,
           * construct the slot of the target table (if is NULL), and
           * store the tuple into the target table.
      
          Currently, we allocate the tuple table slot of the target table into a per-tuple memory context. If the size of that memory context exceeds 50KB, then we reset it. This will cause issues, since it will free target table's slot and at the next iteration (copy the next tuple) we will try to access the attributes of a freed (and not NULL) slot. In addition, the target table slot lifespan is much longer than an individual tuple. So it is not correct to allocate the slot in a per-tuple memory context.
      
          To solve this issue, we allocate target's tuple table slot in PortalHeapMemory. This is the CurrentMemoryContext that is used in split_rows before we start copying tuples. PortalHeapMemory is used already for storing the tuple table slot of the temporary table and the ResultRelInfo of the target tables. PortalHeapMemory is not freed while we copy tuples. After copying all tuples to the new partitions, we drop target tables' slots.
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      c0e1f00c
  5. 23 6月, 2016 1 次提交
  6. 22 6月, 2016 8 次提交
  7. 21 6月, 2016 6 次提交
  8. 20 6月, 2016 4 次提交
  9. 19 6月, 2016 1 次提交
    • H
      Backport 8.4 changes to text search pg_*_is_visible() functions. · a800eb33
      Heikki Linnakangas 提交于
      We had backported similar changes to the other pg_*_is_visible()
      functions earlier, so for consistency, do the same for the new functions
      we got from the 8.3 merge.
      
      The related upstream commit was:
      
      commit 66bb74db
      Author: Tom Lane <tgl@sss.pgh.pa.us>
      Date:   Mon Dec 15 18:09:41 2008 +0000
      
          Arrange for the pg_foo_is_visible and has_foo_privilege families of functions
          to return NULL, instead of erroring out, if the target object is specified by
          OID and we can't find that OID in the catalogs.  Since these functions operate
          internally on SnapshotNow rules, there is a race condition when using them
          in user queries: the query's MVCC snapshot might "see" a catalog row that's
          already committed dead, leading to a failure when the inquiry function is
          applied.  Returning NULL should generally provide more convenient behavior.
          This issue has been complained of before, and in particular we are now seeing
          it in the regression tests due to another recent patch.
      a800eb33
  10. 18 6月, 2016 1 次提交
    • H
      Remove unnecessary debug-logging of tuple counts. · c711300d
      Heikki Linnakangas 提交于
      It doesn't seem too useful, to hae a DEBUG1 of tuple counts. I doubt
      anyone has taken advantage of that in years. Removing it allows us
      to refactor the code inside GetPlannedStmtLogLevel() back into
      GetCommandLogLevel(), like it is in the upstream.
      c711300d
  11. 17 6月, 2016 6 次提交