1. 25 4月, 2017 7 次提交
    • H
      Transform small Array constants to ArrayExprs. · 9a817d45
      Heikki Linnakangas 提交于
      ORCA can do some optimizations - partition pruning at least - if it can
      "see" into the elements of an array in a ScalarArrayOpExpr. For example, if
      you have a qual like "column IN (1, 2, 3)", and the table is partitioned on
      column, it can eliminate partitions that don't hold those values. The
      IN-clause is converted into an ScalarArrayOpExpr, so that is really
      equivalent to "column = ANY <array>"
      
      However, ORCA doesn't know how to extract elements from an array-typed
      Const, so it can only do that if the array in the ScalarArrayOpExpr is
      an ArrayExpr. Normally, eval_const_expressions() simplifies any ArrayExprs
      into Const, if all the elements are constants, but we had disabled that
      when ORCA was used, to keep the ArrayExprs visible to it.
      
      There are a couple of reasons why that was not a very good solution. First,
      while we refrain from converting an ArrayExpr to an array Const, it doesn't
      help if the argument was an array Const to begin with. The "x IN (1,2,3)"
      construct is converted to an ArrayExpr by the parser, but we would miss the
      opportunity if it's written as "x = ANY ('{1,2,3}'::int[])" instead.
      Secondly, by not simplifying the ArrayExpr, we miss the opportunity to
      simplify the expression further. For example, if you have a qual like
      "1 IN (1,2)", we can evaluate that completely at plan time to 'true', but
      we would not do that with ORCA because the ArrayExpr was not simplified.
      
      To be able to also optimize those cases, and to slighty reduce our diff
      vs upstream in clauses.c, always simplify ArrayExprs to Consts, when
      possible. To compensate, so that ORCA still sees ArrayExprs rather than
      array Consts (in those cases where it matters), when a ScalarArrayOpExpr
      is handed over to ORCA, we check if the argument array is a Const, and
      convert it (back) to an ArrayExpr if it is.
      Signed-off-by: NJemish Patel <jpatel@pivotal.io>
      9a817d45
    • T
      Use sles11_x86_64 instead of rhel6_x86_64 for SLES · 29777c62
      Tom Meyer 提交于
      Signed-off-by: NTushar Dadlani <tdadlani@pivotal.io>
      29777c62
    • K
    • K
      Similar to optimizer plan, make executor code to free the bitmap for planner plan. · 08112e2f
      Karthikeyan Jambu Rajaraman 提交于
      Similar to the optimizer, in planner with this
      change`BitmapIndexScanState` is responsible for freeing the bitmaps
      during `ExecEnd` or `ExecRescan`. The parent node doesn't need to worry
      about freeing the bitmaps.
      
      This also fix the following error for planner plan(bitmapscan_ao.sql).
      ```
      select count(1) from bmcrash b1, bmcrash b2 where b1.bitmap_col =
      b2.bitmap_col or b1.bitmap_col = '999' and b1.btree_col1 = 'abcdefg999';
      ERROR:  non hash bitmap (nbtree.c:572)  (seg1 slice2 127.0.0.1:25433
      pid=83873)
      ```
      08112e2f
    • K
      Fix HashStreamOpaque from bad access / double free'ing HashBitMap. · 57b9aeb3
      Karthikeyan Jambu Rajaraman 提交于
      `HashBitMap` is owned by `BitmapIndexScanState`(`node->bitmap`).
      `BitmapIndexScanState` will free the `HashBitMap` when `ExecEnd` is
      called. So it is not the responsibility of `HashStreamOpaque` to free it
      which just has the reference to it.
      Also, it should never try to access
      the `HashBitMap` when `HashStreamOpaque` gets freed. `HashBitMap` might
      have been freed even before the `HashStreamOpaque` gets freed.
      57b9aeb3
    • K
      Revert(except test) "[#129402309] Fix double free when using stream bitmaps with hash bitmaps." · 3d69ae41
      Karthikeyan Jambu Rajaraman 提交于
      This reverts commit b5d7b30f.
      
      `HashStreamOpaque` will never own the `HashBitmap` and hence there is no
      need of variable `free` in `HashStreamOpaque` to denote if it owns the
      `HashBitmap` or not. Hence we don't need `tbm_create_stream_node_ref`
      API at all. Given that `HashStreamOpaque` is not owning the `HashBitMap`
      it should never try to access the `HashBitMap` during the free of
      `HashStreamOpaque`. There is no guarantee that `HashBitmap` is valid at
      that time. `ExecEndBitmapIndexScan` might have freed the `HashBitmap`
      that is referenced in `HashStreamOpaque`.
      3d69ae41
    • M
      GPDB DOCS - Fix issues found when validating files in gpdb-webhelp.di… (#2278) · eef6991e
      mkiyama 提交于
      * GPDB DOCS - Fix issues found when validating files in gpdb-webhelp.ditamap.
      
      * fix for GUC gp_connections_per_thread update to GPDB 5 description.
      eef6991e
  2. 24 4月, 2017 3 次提交
  3. 23 4月, 2017 1 次提交
  4. 22 4月, 2017 14 次提交
  5. 21 4月, 2017 12 次提交
    • A
      Remove dead isXmax argument to Snapshot functions. · 8f4482f9
      Ashwin Agrawal 提交于
      8f4482f9
    • A
      af02eda7
    • A
      Return early from distributed snapshot check if local xid is not normal. · 95606c12
      Ashwin Agrawal 提交于
      Only normal xids can have distributed xids, so no point trying to check
      distributed log and lookout for its corresponding distributed xid. Not sure how
      much performance this impacts but its more important to not go chasing down
      non-existent file, corresponding to frozen xids. Though currently for
      distributed log it treats that as local transaction but just lot of extra work
      to get that answer.
      95606c12
    • D
      Quote exclude items in BASE_BACKUP message · 4658177a
      Daniel Gustafsson 提交于
      When specifying exclusion items to pg_basebackup we need to quote
      them properly to avoid the risk of breaking out of the SCONST rule
      in the lexer with ./pg_basebackup -E "foo'NOWAIT EXCLUDE'bar" or
      something equally silly.
      4658177a
    • X
      Minor fix on resource group statistic information · d16226bd
      xiong-gang 提交于
      1.Change the format of 'total_queue_duration' in 'gp_toolkit.gp_resgroup_status' to keep
      it consistent with 'rsgqueueduration' in 'pg_stat_activity'.
      2.Show resource group information for running queries in 'pg_stat_activity'.
      
      Signed-off-by: Richard Guo<riguo@pivotal.io>
      d16226bd
    • A
      Re-enable sreh tests · 4a6edc8f
      Adam Lee 提交于
      The 'sreh' test was disabled in the regression suite, looks useful,
      re-enable it.
      
      GPDB 5 removed the error table feature, rewrite these cases to use
      gp_read_error_log().
      Signed-off-by: NPeifeng Qiu <pqiu@pivotal.io>
      4a6edc8f
    • H
      Ignore a GPPC test case which intends to modify original query object · 5aa1b924
      Haozhou Wang 提交于
      It's good, but triggers an assertion with ORCA enabled, safe to ignore.
      
      > FATAL:  Unexpected internal error (transform.c:54)
      > DETAIL:  FailedAssertion("!(equal(qcopy, query) && "Preprocessing should not modify original query object")", File: "transform.c", Line: 54)
      > ...
      > connection to server was lost
      5aa1b924
    • B
      Bump ORCA to 2.24 · 74b77e7a
      Bhuvnesh Chaudhary 提交于
      74b77e7a
    • A
      Fix partition_locking test that fails intermittently · 1cfb8183
      Asim R P 提交于
      Objective of the test is only to check if DDL/DML on partition tables lock only
      the root table on QD.  Child partitions are locked on QE as needed.  The
      intermittent failures are due to more locks acquired than expected.  In all
      such cases, the additional locks were AccessShare locks on some catalog table.
      This commit filters out locks on catalog tables from expected output.
      
      The intermittent failures merit investigation but that can happen regardless of
      this test fix.
      1cfb8183
    • C
      gpperfmon and coverity: resolve issues with `make distclean` · 0da09faf
      C.J. Jameson 提交于
      The coverity build was failing on the gpperfmon `make distclean` step
      
      Fixed on both sides:
      - Don't call `make distclean` in the coverity build script -- not
        necessary
      - Don't clean gpperfmon from `gpAux/Makefile`: this Makefile's clean
        targets are for enterprise-build related artifacts. General developers
        should be running `make clean distclean` from the top level directory of
        this repository.
      
      Additional fix -- doesn't address the coverity red but a similar
      cleanup:
      - Add cleanup of gpperfmon to the top level makefile's `distclean`
        target. Not sure why it wasn't there; probably just an accidental
        omission.
      - Add note explaining why the top level makefile has to circumvent
        `gpAux/Makefile`
      Signed-off-by: NMelanie Plageman <mplageman@pivotal.io>
      0da09faf
    • D
      Fix infinite execution of partition selector · a7694674
      This fixes a bug introduced in e378d84b
      where the partition selector may go in an infinite loop because it never
      got a chance to actually _select_ the partitions.
      a7694674
    • D
      Revert "Avoid null pointer deref in partition selection" · 3416a948
      Dhanashree Kashid and Jesse Zhang 提交于
      Commit 7b6dc9bf was well-intentioned,
      but wrong: in cases where `outerPlan` is NULL, inputSlot should be
      `NULL`, but the execution of the partition selector should *NOT*
      prematurely end there, instead, a static partition selection should
      happen (once) before this operator was exhausted (returning NULL).
      
      This is a pure revert commit. The `NULL` initialization will follow.
      
      This reverts commit 7b6dc9bf.
      3416a948
  6. 20 4月, 2017 3 次提交