1. 15 6月, 2016 1 次提交
  2. 14 6月, 2016 4 次提交
  3. 13 6月, 2016 3 次提交
    • A
      Small improvements to the vagrant build for centos · fb911c72
      Andreas Scherbaum 提交于
      Fix provided by @akon-dey
      Closes: #780
      fb911c72
    • K
      Dispatch exactly same text string for all slices. · 4b360942
      Kenan Yao 提交于
      Include a map from sliceIndex to gang_id in the dispatched string,
      and remove the localSlice field, hence QE should get the localSlice
      from the map now. By this way, we avoid duplicating and modifying
      the dispatch text string slice by slice, and each QE of a sliced
      dispatch would get same contents now.
      
      The extra space cost is sizeof(int) * SliceNumber bytes, and the extra
      computing cost is iterating the SliceNumber-size array. Compared with
      memcpy of text string for each slice in previous implementation, this
      way is much cheaper, because SliceNumber is much smaller than the size
      of dispatch text string. Also, since SliceNumber is so small, we just
      use an array for the map instead of a hash table.
      
      Also, clean up some dead code in dispatcher, including:
      (1) Remove primary_gang_id field of Slice struct and DispatchCommandDtxProtocolParms
      struct, since dispatch agent is deprecated now;
      (2) Remove redundant logic in cdbdisp_dispatchX;
      (3) Clean up buildGpDtxProtocolCommand;
      4b360942
    • P
      Fix bugs when a SET command is executed within init plan · 2cda812c
      Pengzhou Tang 提交于
      In commit d2725929, GPDB marked all allocatedReaderGangs with noReuse flag. When plan contains
      init plan and a SET command executed within it, GPDB will mark pre-assigned gangs to noReuse and
      destroy them which make query crash
      2cda812c
  4. 11 6月, 2016 4 次提交
    • F
      The GPDB Vmem is the lowest layer of memory allocator that supports higher... · 42ca3506
      Foyzur Rahman 提交于
          The GPDB Vmem is the lowest layer of memory allocator that supports higher allocators such as AllocSet. This layer (mostly defined in memprot.c) is in charge of actually calling malloc/realloc/free to allocate/reallocate/free memory. In this process this layer is also in charge of reserving "virtual" memory or Vmem, which is a GPDB specific shared memory counter to track per-segment combined allocations across all the GPDB processes under Vmem umbrella. The Vmem counter is managed by a separate module Vmem_Tracker, and the memprot functions (such as gp_malloc, gp_free2 and gp_realloc) call the APIs provided by VmemTracker.
      
          Previously the memprot allocators (gp_alloc/gp_realloc/gp_free) were only allocating/freeing memory but were not adding any additional metadata in the header (and there was no header) to track the size of allocations. Therefore, there was no gp_free as freeing memory requires the size of the free to adjust Vmem counter inside VmemTracker. This was patched by explicitly passing size info in gp_free2.
      
          In this PR we do the following:
      
          * We add allocation size in Vmem header (along with checksums which are only available in debug build to detect header and footer boundary, and buffer overruns).
      
          * We remove size information from the block header of AllocSet.
      
          * We rename gp_free2 to gp_free as the second parameter (size information) is now obtained from the header and therefore no longer necessary
      
          * We modify all the consumers of memprot.c APIs to use the new APIs
      
          * We add unit tests to test the metadata and the correctness of the new Vmem allocators
      
          This is the first step to integrate external modules and third party allocations with Vmem. A long running issue in GPDB is its inability to track allocations by external components including libraries such as ORCA. Therefore, the central Vmem counter is often way off from the underlying allocations, and this may run the system out of memory. By maintaining the size information in the Vmem header, we now have a self-contained allocator that can be exposed to external allocators such as GPOS allocators, without forcing them to manage size information separately.
      
          This fixes #117269929.
      Signed-off-by: NMarc Spehlmann <marc.spehlmann@gmail.com>
      42ca3506
    • J
      [#120984085] Adds GUC for array expansion. · 53230187
      Jesse Zhang and Marc Spehlmann 提交于
      This GUC will be used to control the MEMO size as well as optimization
      time for large IN list or large array comparison expressions.
      
      Only the Array with less number of elements than the GUC will be
      expanded and participate in constraint derivation.
      
      Trade-off of using this GUC is loss of potential benefits from the
      constraint derivation (e.g. conflict detection, partition elimination)
      with shorter optimization time and less memory utilization.
      53230187
    • N
    • N
      Revert "Reset g_dataSourceCtx variable, since the context is destroyed at EOX." · b918bb17
      Nikos Armenatzoglou 提交于
      This reverts commit d9edb869.
      g_dataSourceCtx should not be reset in AtAbort_ExtTables, since external tables is not the only component that uses it.
      b918bb17
  5. 10 6月, 2016 2 次提交
    • J
      Add check for backup directory existence to gprecoverseg · 5b853b3a
      Jamie McAtamney 提交于
      A previous commit added the capability to gprecoverseg to copy all
      backup files from the mirror to the primary during a full recovery,
      but assumed that the backup directory would always exist and so
      gprecoverseg -F would fail if it was not present.  This commit adds
      a check to ensure that gprecoverseg -F will finish successfully if
      there is no backup directory.
      5b853b3a
    • H
      Update minirepro and pg_dump utility to dump both relation and function ddl · 318b86af
      Haisheng Yuan 提交于
      This patch updates minirepro utility to support the following functions:
      1. Dump ddl and stats for multiple queries in a query file
      2. Dump ddl of relation that is used in CTE
      3. Dump ddl of function that is used in the query
      4. Add 2 options: relation-oids and function-oids into pg_dump command line tool
      318b86af
  6. 09 6月, 2016 4 次提交
    • H
      Simplify counting of tupletable slots, by getting rid of the counting. · 10ca88b4
      Heikki Linnakangas 提交于
      Backport this patch from PostgreSQL 9.0, which replaces the tuple table
      array with a linked list of individually palloc'd slots. With that, we
      don't need to know the size of the array beforehand, and don't need to
      count the slots. The counting was especially funky for subplans in GPDB,
      and it was about to change with the upcoming PostgreSQL 8.3 merge again.
      This makes it a lot simpler.
      
      I don't plan to backport the follow-up patch to remove the ExecCountSlots
      infrastructure. We'll get that later, when we merge with PostgreSQL 9.0.
      
      commit f92e8a4b
      Author: Tom Lane <tgl@sss.pgh.pa.us>
      Date:   Sun Sep 27 20:09:58 2009 +0000
      
          Replace the array-style TupleTable data structure with a simple List of
          TupleTableSlot nodes.  This eliminates the need to count in advance
          how many Slots will be needed, which seems more than worth the small
          increase in the amount of palloc traffic during executor startup.
      
          The ExecCountSlots infrastructure is now all dead code, but I'll remove it
          in a separate commit for clarity.
      
          Per a comment from Robert Haas.
      10ca88b4
    • H
      Change the way temp schemas are created. · 8a2cf323
      Heikki Linnakangas 提交于
      This reverts much of the changes vs. upstream, related to temp schema
      creation. Instead of using the normal CREATE SCHEMA processing to also
      create the temporary schema, let InitTempTableNameSpace() to do that
      like in the upstream. But in addition to creating the the temp schema
      locally, it dispatches a special CreateSchemaStmt command to the
      executor nodes, which instructs the executor nodes to also call
      InitTempTableNameSpace().
      8a2cf323
    • H
      Bump check on regression database size to 5 GB. · 2ba36ba6
      Heikki Linnakangas 提交于
      The regression database has grown over time, so that it's just above the
      1 GB size that the regression test used as a "sanity check". I think the
      new zlib regression test broke the camel's back. Bump it up to 5 GB, giving
      us about 4 GB of headroom to grow.
      2ba36ba6
    • S
      c19b3a05
  7. 08 6月, 2016 4 次提交
  8. 07 6月, 2016 17 次提交
  9. 06 6月, 2016 1 次提交