1. 12 12月, 2018 1 次提交
    • J
      Add gpexpand rollback test case (#6129) · 329f5f1b
      Jialun 提交于
      - Add a fault inject to test rollback process
      - Remove pg_hba.conf updating during online expand, for only master
        will connect to segment via libpq, master's ip has already been
        in pg_hba.conf
      329f5f1b
  2. 11 12月, 2018 6 次提交
    • H
      Remove unused faultinject probe. · 3f6f76d8
      Heikki Linnakangas 提交于
      3f6f76d8
    • H
      Remove unused source files. · 35175df8
      Heikki Linnakangas 提交于
      Commit 198f701e forgot to remove these.
      35175df8
    • H
      Optimize CHECK_FOR_INTERRUPTS() · 2f628da3
      Heikki Linnakangas 提交于
      CHECK_FOR_INTERRUPTS() had grown quite bloated, given how frequently it runs.
      It called IsResQueueEnabled(), which added the overhead of a function call,
      even if resource queues were not enabled. If they were enabled, it would
      call BackoffBackendTick(), which adds another function call.
      BackoffBackendTick() checked a lot of other conditions, so it would still
      often not do anything.
      
      It turns out to be cheaper to always increment the "tick" counter, to avoid
      the overhead of checking whether we need it or not. Move all the the checks
      for whether the whole backoff mechanism is even needed, into a function
      that only runs when the tick counter expires.
      
      I've seen those calls take up to 5% of CPU overhead, when profiling some
      queries with linux 'perf'. This should shave off the time spent on that.
      Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
      Reviewed-by: NNing Yu <nyu@pivotal.io>
      2f628da3
    • N
      resgroup: allow operators enlarge their memory quota · 90795402
      Ning Yu 提交于
      Operators like HashAgg might need more memory quota than granted.  In
      resource group mode this could be allowed as memory can be allocated
      from global or per-group shared memory.
      
      By supporting this we improved the support for low-end resgroups, as
      long as there is enough shared memory low-end resgroups could still run
      large queries although the performance might not be the best.
      90795402
    • B
      Fix OOM during HLL merge calculation · 7fd56fd0
      Bhuvnesh Chaudhary 提交于
      We need to free up the temporary HLL counters created during HLL merging,
      if there are lot of partitions and the data is high for each partition,
      we may run into OOM if the temporary counters are not released.
      
      In the merge_leaf_stats function, a nested for loop leaks a single HLL
      counter for N^2 iterations (where N = number of partitions). This is run
      in a single context, hence leaking considerable memory, leading to VMEM
      errors.
      
      This patchs fixes the leaks.
      Co-authored-by: NRahul Iyer <riyer@pivotal.io>
      Co-authored-by: NAbhijit Subramanya <asubramanya@pivotal.io>
      7fd56fd0
    • S
      Bump ORCA version to v3.14.0 · c99b7715
      Sambitesh Dash 提交于
      c99b7715
  3. 10 12月, 2018 15 次提交
    • H
      Add back missing upstream comment. · b4f04a32
      Heikki Linnakangas 提交于
      b4f04a32
    • H
      Remove obsolete comment. · 01583783
      Heikki Linnakangas 提交于
      'subqfromlist' field was removed by commit f16deabd.
      01583783
    • H
      Remove duplicated code for IA-64 (Itanium) stack depth checking. · fe3ab604
      Heikki Linnakangas 提交于
      We had backported this earlier, and got a second copy as part of upstream
      merge. Went unnoticed because no one has tried building GPDB on Itanium.
      fe3ab604
    • H
      Remove duplicated 'forbidden_in_wal_sender' call. · f475a8f5
      Heikki Linnakangas 提交于
      Fumbled this in upstream merge. Harmless, but let's be tidy.
      f475a8f5
    • H
      Remove leftover code for non-existent 'G' and 'W' protocol messages. · ac486dd4
      Heikki Linnakangas 提交于
      Looking at the historical pre-open-sourcing repository, the 'G' message
      was used by ancient prototype code from 2007-2009. The prototype code was
      removed in 2009, but this snippet was left over. I don't think it was used
      in any released version of GPDB.
      
      The 'W' type message was removed in commit daf6cdbc, but this was left
      over.
      ac486dd4
    • H
      Remove dangerous 'extern' declarations in .c file. · c9cfb4c8
      Heikki Linnakangas 提交于
      If the actual signature of the function/variable changes, with an extern
      declaration directly in the other .c file, you might not notice. The
      correct way to use 'extern', is to have only one 'extern' declaration, in
      a header file.
      c9cfb4c8
    • H
      Fix outdated comment. · 570893a1
      Heikki Linnakangas 提交于
      Commit b3c50e40 changed the argument from StringInfo to ErrorData *,
      but neglected the comment in the header file about it. Fix, by copying
      the up-to-date comment from the .c file.
      570893a1
    • H
      Remove unused round() macro. · 83b4bed7
      Heikki Linnakangas 提交于
      It was unused, and we don't support Windows as a server platform, anyway.
      83b4bed7
    • H
      Remove a couple of unused functions. · 953e4d7b
      Heikki Linnakangas 提交于
      I think these functions were to implement ALTER TABLE MODIFY RANGE/LIST,
      but that command doesn't exist anymore. Not sure if it was ever fully
      implemented.
      953e4d7b
    • H
      Remove unused argument. · ff0e2384
      Heikki Linnakangas 提交于
      ff0e2384
    • H
      Remove duplicate function prototype. · 196045c8
      Heikki Linnakangas 提交于
      196045c8
    • H
      Remove unused PSETOP_PARALLEL_REPLICATED. · acf7534e
      Heikki Linnakangas 提交于
      acf7534e
    • H
      Remove unused 'is_agg' args. · 85c51e49
      Heikki Linnakangas 提交于
      It was always passed as 'true'.
      85c51e49
    • Z
      Add check Nullptr for CdbTryOpenRelation in parserOpenTable · 7863052b
      Zhenghua Lyu 提交于
      `CdbTryOpenRelation` might return a NULL pointer. Each time we
      use the value returned by it we should always check if the
      result is NULL. `parserOpenTable` forgot doing such check, this
      commit adds the check for NULL.
      7863052b
    • T
      gpexpand improvement using newly added features · a490e50f
      Tang Pengzhou 提交于
      commit 8eed4217 & e0b06678 allow us to do a gpexpand of GPDB cluster
      without a restart, so we called this strategy as "online expand", those
      two commits were mainly focus on how to avoid restarting cluster when
      expanding cluster, this commit will do the left work to improve gpexpand
      using a few features we merged to master recently.
      
      First improvement is, it's no longer necessary to change policy of all
      non-partition table to random at the beginning of gpexpand. Previously,
      we couldn't tell the difference between expanded table and non-expaned
      table, so if the distribution policy of these tables were the same,
      planner took these tables's data as co-located and produced a incorrect
      plan. To avoid this, gpexpand used to change policy of all table to
      random so planner could produce a correct but a non-effective plan,
      because random policy always means annoying broadcase motion.
      
      Now each table has a 'numsegments' attribute introduced by 4eb65a53, GPDB
      can recognize expanded and non-expand table and produced correct plans. so
      the first imporvement is removing the randomization step of tables.
      
      The second improvement is, use a brand new syntax "ALTER TABLE foo EXPAND TABLE"
      to focus on the data rebalance of tables. Previously, tables were converted
      to randomly before rebalance and numsegments of tables were always the same
      with GPDB cluster size, so we can use a tricky "ALTER TABLE foo SET WITH
      (REORGNIZE = true) DISTRIBUTED BY (original_key)" command to rebalance data
      to new added segments, now policy and numsegments are not changed before
      rebalancing data, so expanding such tables is not match the concept of "SET
      DISTRIBUTED BY" now, we need a proper syntax to focus on table expanding.
      
      New expand syntax named "ALTER TABLE foo EXPAND TABLE", we have two methods
      to do the real data movement inside, one is CTAS, another is RESHUFFLE, which
      one is better depends on how much data needs to be moved and whether the table
      has index and whether the table is a append only table (analyzed by Hekki).
      
      A drawback of this commit is we always expand a partition within a transaction,
      the old behavior is expand the leaf partition in parallel which is faster for
      a partition table. We don't allow root partition and its leaf partitions to
      have different numsegments for now, this commit disabled the old behavior
      temporarily. A topic on how to expanding partition table in parallel is
      under discussion and we wish to bring the ability back properly in the feature.
      
      * Refine name quote
      
      Eg: if schema name of table is a.b, table name is c'd, then current gpexpand
      cann't handle it.
      a490e50f
  4. 08 12月, 2018 6 次提交
  5. 07 12月, 2018 12 次提交