1. 19 1月, 2018 12 次提交
    • H
      Support EXT_STAGING_TABLE option in configuration file for user (#4356) · d0446107
      huiliang-liu 提交于
      to definite the reusing external table by themselves instead of
      searching in gpload, which may have bad performance if there are
      too many external tables.
      d0446107
    • D
      resgroupcmds.h: add lock.h which is necessary for LOCKMODE · 952090a6
      David Sharp 提交于
      Author: David Sharp <dsharp@pivotal.io>
      Author: Amil Khanzada <akhanzada@pivotal.io>
      952090a6
    • D
    • D
      Fix get_attstatsslot()/free_attstatsslot() when statistics are broken. · ae06d7b0
      Dhanashree Kashid 提交于
      In scenarios where pg_statistic contains wrong statistic entry for an
      attribute, or when the statistics on a particular attribute are broken,
      for e.g the type of elements stored in stavalues<1/2/3> is different
      than the actual attribute type or when there are holes in the attribute
      numbers due to adding/dropping columns; following two APIs fail because
      they relied on the attribute type sent by the caller:
      
      - get_attstatsslot() : Extracts the contents (numbers/frequency array and
      values array) of the requested statistic slot (MCV, HISTOGRAM etc). If the
      attribute is pass-by-reference or if the attribute is of toastable type
      (varlena types)then it returns a copy allocated with palloc()
      - free_attstatsslot() : Frees any palloc'd data by get_attstatsslot()
      
      This problem was fixed in upstream 8.3
      (8c21b4e9) for get_attstatsslot(),
      wherein the actual element type of the array will be used for
      deconstructing it rather that using caller passed OID.
      free_attstatsslot() still depends on the type oid sent by caller.
      
      However the issue still exists for free_attstatsslot() where it crashes while
      freeing the array. The crash happened because the caller sent type OID was of
      type TEXT meaning this a varlena type and hence free_attstatsslot() attempted
      to free the datum; however due to the broken slot the datums extracted from
      values array were of fixed length type such as int. We considered the int value
      as memory address and crashed while freeing it.
      
      This commit brings in a following fix from upstream 10 which redesigns
      get_attstatsslot()/free_attstatsslot() such than they robust to scenarios like
      these.
      
      commit 9aab83fc
      Author: Tom Lane <tgl@sss.pgh.pa.us>
      Date:   Sat May 13 15:14:39 2017 -0400
      
          Redesign get_attstatsslot()/free_attstatsslot() for more safety and speed.
      
          The mess cleaned up in commit da075960 is clear evidence that it's a
          bug hazard to expect the caller of get_attstatsslot()/free_attstatsslot()
          to provide the correct type OID for the array elements in the slot.
          Moreover, we weren't even getting any performance benefit from that,
          since get_attstatsslot() was extracting the real type OID from the array
          anyway.  So we ought to get rid of that requirement; indeed, it would
          make more sense for get_attstatsslot() to pass back the type OID it found,
          in case the caller isn't sure what to expect, which is likely in binary-
          compatible-operator cases.
      
          Another problem with the current implementation is that if the stats array
          element type is pass-by-reference, we incur a palloc/memcpy/pfree cycle
          for each element.  That seemed acceptable when the code was written because
          we were targeting O(10) array sizes --- but these days, stats arrays are
          almost always bigger than that, sometimes much bigger.  We can save a
          significant number of cycles by doing one palloc/memcpy/pfree of the whole
          array.  Indeed, in the now-probably-common case where the array is toasted,
          that happens anyway so this method is basically free.  (Note: although the
          catcache code will inline any out-of-line toasted values, it doesn't
          decompress them.  At the other end of the size range, it doesn't expand
          short-header datums either.  In either case, DatumGetArrayTypeP would have
          to make a copy.  We do end up using an extra array copy step if the element
          type is pass-by-value and the array length is neither small enough for a
          short header nor large enough to have suffered compression.  But that
          seems like a very acceptable price for winning in pass-by-ref cases.)
      
          Hence, redesign to take these insights into account.  While at it,
          convert to an API in which we fill a struct rather than passing a bunch
          of pointers to individual output arguments.  That will make it less
          painful if we ever want further expansion of what get_attstatsslot can
          pass back.
      
          It's certainly arguable that this is new development and not something to
          push post-feature-freeze.  However, I view it as primarily bug-proofing
          and therefore something that's better to have sooner not later.  Since
          we aren't quite at beta phase yet, let's put it in.
      
          Discussion: https://postgr.es/m/16364.1494520862@sss.pgh.pa.us
      
      Most of the changes are same as the upstream commit with following additional
      changes:
      - Relcache translator changes in ORCA.
      - Added a test that simulates the crash due to broken stats
      - get_attstatsslot() contains an extra check for empty slot array which existed
      in master but is not there in upstream.
      Signed-off-by: NAbhijit Subramanya <asubramanya@pivotal.io>
      ae06d7b0
    • C
      Remove unused behave steps from walrep/gpcrondump removal (#4327) · a6a0e8b0
      Chris Hajas 提交于
      I used the command `behave test/behave/mgmt_utils --format=steps.usage --dry-run` to identify unused steps. Some of these were false positives or were extra given/when/then steps that I did not remove.
      
      Author: Chris Hajas chajas@pivotal.io
      a6a0e8b0
    • J
      Disable ProcessStartupPacket fault injector for FTS handler process · b30fc633
      Jimmy Yih 提交于
      This was found in the dispatch ICG regress test where
      ProcessStartupPacket fault injector was being used. In this recent
      version of 6.0, FTS probe handler now uses ProcessStartupPacket. In
      addition to blocking the backend, this now blocks the FTS probe
      handler which caused failover to occur.
      
      Author: Xin Zhang <xzhang@pivotal.io>
      Author: Jimmy Yih <jyih@pivotal.io>
      b30fc633
    • J
      Remove unnecessary ftsEnabled variable · f795613f
      Jimmy Yih 提交于
      This ftsEnabled variable is no longer necessary because FTS is always
      enabled now. Back in 4.3.x and 5.x, this variable was a representation
      of whether or not the cluster had filerep mirrors.
      
      Author: Xin Zhang <xzhang@pivotal.io>
      Author: Jimmy Yih <jyih@pivotal.io>
      f795613f
    • A
      Reduce DEFAULT_QD_MAX_CONNECTION to 150 · 659be26d
      Asim R P 提交于
      This is to avoid the cluster failure due to lack of shared memory
      reserved for many connections.
      
      Author: Asim R P <apraveen@pivotal.io>
      Author: Xin Zhang <xzhang@pivotal.io>
      659be26d
    • A
      Add create-tinc-test-cluster make target · 17ce6832
      Ashwin Agrawal 提交于
      Adding support to create cluster for tinc testing. This also create
      gptest database. Here is an example script to run tinc tests:
      
      ```
      cd ~/workspace/gpdb
      source .../greenplum_path.sh
      make create-tinc-test-cluster
      source gpAux/gpdemo/gpdemo-env.sh
      make -C src/test/tinc walrep_2 # to run walrep_2 tinc tests
      ```
      
      Author: Xin Zhang <xzhang@pivotal.io>
      Author: Ashwin Agrawal <aagrawal@pivotal.io>
      17ce6832
    • K
      97a762af
    • E
      Updating Memory accounting test query · addc1c44
      Ekta Khanna 提交于
      The existing memory accounting test for OOM was not able to exceed the
      OOM bound due to the plan generated by ORCA v2.53.11. Prior to that the
      it would hit the OOM limit.  This commit updates the
      test query to exceed OOM with the latest version of ORCA and also bump
      the version to 2.53.11.
      Signed-off-by: NAbhijit Subramanya <asubramanya@pivotal.io>
      addc1c44
    • M
      docs: best practices - update some system config information. (#4330) · d26ac7b1
      Mel Kiyama 提交于
      -updated XFS mount options
      -updated GPDB/ipv4_local_port_range information
      -added example for setting blockdev.
      
      PR for 5X_STABLE
      Will be ported to MAIN
      d26ac7b1
  2. 18 1月, 2018 28 次提交