1. 23 8月, 2017 1 次提交
  2. 22 8月, 2017 16 次提交
  3. 21 8月, 2017 7 次提交
    • H
      Fix tests for NULL values in ROWS PRECEDING/FOLLOWING clause. · de548159
      Heikki Linnakangas 提交于
      There were two problems with the existing NULL check. Firstly, it would
      not catch expressions that returned NULL at runtime, only NULL constants.
      You got a non-friendly "Unexpected internal error" error instead. Secondly,
      it rejected expressions that contained NULL constants anywhere in the
      expression, even if the expression as whole returned a non-NULL.
      
      To fix both issues, add a NULL-check with a better error message to the
      executor, and remove the parse-time check altogether. I copied the error
      message texts from the upstream, so that you get the same error, even
      though the implementation is quite different.
      
      Add regression tests for those cases too, we apparently didn't have any.
      
      Fixes github issue #2999.
      de548159
    • D
      Move ORCA invocation into standard_planner · d5dbbfd9
      Daniel Gustafsson 提交于
      The way ORCA was tied into the planner, running a planner_hook
      was not supported in the intended way. This commit moves ORCA
      into standard_planner() instead of planner() and leaves the hook
      for extensions to make use of, with or without ORCA. Since the
      intention with the optimizer GUC is to replace the planner in
      postgres, while keeping the planning proess, this allows for
      planner extensions to co-operate with that.
      
      In order to reduce the Greenplum footprint in upstream postgres
      source files for future merges, the ORCA functions are moved to
      their own file.
      
      Also adds a memaccounting class for planner hooks since they
      otherwise ran in the planner scope, as well as a test for using
      planner_hooks.
      d5dbbfd9
    • H
      Remove redundant "fast" version of _readWindowSpec. · ab5c9cb2
      Heikki Linnakangas 提交于
      Both versions of the function, the one in readfast.c and readfuncs.c, were
      identical. No need to define a special fast version then.
      ab5c9cb2
    • H
      Remove unused struct. · 96e6f19d
      Heikki Linnakangas 提交于
      96e6f19d
    • R
      Support alter memory spill ratio in resource group. · 0c458650
      Richard Guo 提交于
      The alteration of memory_spill_ratio will take effect immediately.
      
      In addition, remove 'SET statement_mem' from resource group
      test cases, as this GUC will take no effect in resource group.
      0c458650
    • X
      Optimize access of resource group catalog table · cee2db53
      xiong-gang 提交于
      We make a copy of resource group capabilities in the shared memory, and
      apply the change at the end of the ALTER transaction. In this way, we can
      access shared memory content instead of catalog at the beginning of a
      transaction as the visibility is the same.
      Signed-off-by: NNing Yu <nyu@pivotal.io>
      cee2db53
    • R
      Make resource group test cases pass when number of segments is not three · d23fcc62
      Richard Guo 提交于
      In some resource group test cases, the result will depend on the
      number of segments, and current test cases are based on three
      segments. This commit is to fix this issue.
      
      In addition, in isolation2, gpdiff needs at least 3 dashes to identify 
      the result of 'select' statement. Change the elements to be above 
      100 in test case 'resgroup_memory_materialize_spill' to meet this 
      requirement.
      d23fcc62
  4. 19 8月, 2017 11 次提交
  5. 18 8月, 2017 5 次提交
    • H
      Whitespace fixes. · 45ce104e
      Heikki Linnakangas 提交于
      To match upstream more closely, hopefully avoiding some silly merge
      conflicts in the future.
      45ce104e
    • H
      Fix typo in comment. · dc17a7c4
      Heikki Linnakangas 提交于
      extent -> extend. And reformat.
      dc17a7c4
    • H
      Fix extract_actual_clauses() calls. · aecd7f0f
      Heikki Linnakangas 提交于
      Remove premature optimization in create_indexscan_plan, where we stripped
      RestrictInfo decorations while we iterated through the list. That was
      premature, because while it works, order_qual_clauses() can make use of the
      information in the RestrictInfo, if it's still present. This reverts that
      piece of code to the way it is in the upstream. I'm not sure if this makes
      any observable difference, but let's be tidy in any case.
      
      Also, reorder the extract_actual_clauses and order_qual_clauses calls
      in create_ctescan_plan, so that order_qual_clauses is called first. For
      the same reason.
      aecd7f0f
    • H
      Add test case for \dx and \dx+ · bb379e33
      Heikki Linnakangas 提交于
      I repurposed the existing psql_gpdb_du test for this. It was very small,
      I think we can put tests for other \d commands in the same file. In the
      passing fix a typo in a comment there, and move the expected output from
      output/ to expected/, because it doesn't need any string replacements.
      bb379e33
    • H
      Map \dx+ command to \dx, until PostgreSQL 9.1. · 733061a6
      Heikki Linnakangas 提交于
      The \dx+ command requires pg_describe_object() function, which we don't
      have in GPDB yet. Until then, treat \dx+ the same as \dx.
      
      Note that this code is written such that \dx+ can still be used, when
      connected to a PostgreSQL 9.1 or later server. Not that we particularly care
      about that case, but might as well.
      
      Per github issue #2574.
      733061a6