1. 19 7月, 2017 1 次提交
    • O
      Add support to enable singleton bucket in histogram · b31dcf31
      Omer Arap 提交于
      If gpdb and orca is build with debugging enabled, there is an assert in
      orca to check if the upper and lower bound are both closed.
      `GPOS_ASSERT_IMP(FSingleton(), fLowerClosed && fUpperClosed);`
      
      The histogram that is stored in pg_statistics might lead to have a
      singleton buckets as follows: `10, 20, 20, 30, 40` which will lead to have
      buckets in this format: `[0,10), [10, 20), [20,20), [20,30), [30,40]`
      
      This will cause assert to fail since [20,20) is a singleton bucket but
      its upper bound is open.
      
      With this fix, the generated buckets will look like below:
      `[0,10], [10,20), [20,20], (20,30), [30,40]`
      Signed-off-by: NShreedhar Hardikar <shardikar@pivotal.io>
      b31dcf31
  2. 18 7月, 2017 7 次提交
  3. 16 7月, 2017 1 次提交
  4. 15 7月, 2017 1 次提交
    • H
      Remove PartOidExpr, it's not used in GPDB. (#2481) · 941327cd
      Heikki Linnakangas 提交于
      * Remove PartOidExpr, it's not used in GPDB.
      
      The target lists of DML nodes that ORCA generates includes a column for the
      target partition OID. It can then be referenced by PartOidExprs. ORCA uses
      these to allow sorting the tuples by partition, before inserting them to the
      underlying table. That feature is used by HAWQ, where grouping tuples that
      go to the same output partition is cheaper.
      
      Since commit adfad608, which removed the gp_parquet_insert_sort GUC, we
      don't do that in GPDB, however. GPDB can hold multiple result relations open
      at the same time, so there is no performance benefit to grouping the tuples
      first (or at least not enough benefit to counterbalance the cost of a sort).
      
      So remove the now unused support for PartOidExpr in the executor.
      
      * Bump ORCA version to 2.37
      Signed-off-by: NEkta Khanna <ekhanna@pivotal.io>
      
      * Removed acceptedLeaf
      Signed-off-by: NEkta Khanna <ekhanna@pivotal.io>
      941327cd
  5. 14 7月, 2017 5 次提交
  6. 13 7月, 2017 12 次提交
    • H
      Harmonize error message, add test for external tables with too many URIs. · 4055ab3b
      Heikki Linnakangas 提交于
      Seems like a good thing to test. To avoid having to have separate ORCA
      and non-ORCA expected outputs, change the ORCA error message to match
      that you get without ORCA.
      4055ab3b
    • D
      Remove unreachable and unused code (#2611) · f4e50a64
      Daniel Gustafsson 提交于
      This removes code which is either unreachable due to prior identical
      tests which break the codepath, or which is dead due to always being
      true. Asserting that an unsigned integer is >= 0 will always be true,
      so it's pointless.
      
      Per "logically dead code" gripes by Coverity
      f4e50a64
    • J
      Fix gpsegwalrep.py deadlock issue · 195d65d4
      Jimmy Yih 提交于
      When running `gpsegwalrep.py start`, it would intermittently deadlock
      on the subprocess.check_output call.  Apparently, concurrent
      subprocess.check_output calls can deadlock depending on what shell
      commands are run and how fast they execute.  For now, fix the issue by
      only calling subprocess.check_output under a thread lock.  Someone can
      revisit this later although it is assumed a proper tool will be
      created in the near future.
      195d65d4
    • A
      gpfaultinjector should work with filerep disabled · 41ba1012
      Abhijit Subramanya 提交于
      If we try to inject certain faults when the system is initialized with filerep
      disabled, we get the following error:
      
      ```
      gpfaultinjector error: Injection Failed: Failure: could not insert fault
      injection, segment not in primary or mirror role
      Failure: could not insert fault injection, segment not in primary or mirror
      role
      ```
      
      This patch removes the check for the role for non-filerep faults so that they
      don't fail on a cluster initialized without filerep.
      41ba1012
    • A
      Use block number instead of LSN to batch changed blocks in filerep · abe13c79
      Asim R P 提交于
      Filerep resync logic to fetch changed blocks from changetracking (CT)
      log is changed.  LSN is no longer used to filter out blocks from CT
      log.  If a relation's changed blocks falls above the threshold number
      of blocks that can be fetched at a time, the last fetched block number
      is remembered and used to form subsequent batch.
      abe13c79
    • A
      TINC test to detect a bug in filerep resync logic. · 8e59eea3
      Asim R P 提交于
      Filerep resync works by obtaining blocks changed since a mirror went down from
      changetracking (CT) log.  The changed blocks are obtained in fixed sized
      batches.  Blocks of the same relation are ordered by block number.  The bug
      occurs when a higher numbered block of a relation is changed such that it has
      lower LSN as compared to lower numbered blocks.  And the higher numbered blocks
      is not included in the first batch of changed blocks for this relation.  Such
      blocks miss being resynchronized to mirror due to incorret filter based on
      previously obtained changed blocks' LSN.  That means the mirror is eventually
      declared in-sync with primary but some changed blocks remain only on the
      primary.  This loss in data manifests only when the mirror takes over as
      primary, upon rebalance or the primary going down.
      8e59eea3
    • A
      Add GUC to control number of blocks that a resync worker operates on · 2960bd7c
      Asim R P 提交于
      The GUC gp_changetracking_max_rows replaces a compile time constant.  Resync
      worker obtains at the most gp_changetracking_max_rows number of changed blocks
      from changetracking log at one time.  Controling this with a GUC allows
      exploiting bugs in resync logic around this area.
      2960bd7c
    • M
      Docs: add database and object name limitation. · 85372be2
      mkiyama 提交于
      85372be2
    • M
      Docs: minor edits and fixes. · 0ed68855
      mkiyama 提交于
      0ed68855
    • M
      Docs: minor update for backup with NetBackup · 041f7146
      mkiyama 提交于
      041f7146
    • M
      Docs: add gpfdist info for X-GP-PROTO in request header · 0f381544
      mkiyama 提交于
      0f381544
    • M
      Docs: update gpssh.config option sync_retries · 3e14992e
      mkiyama 提交于
      3e14992e
  7. 12 7月, 2017 3 次提交
  8. 11 7月, 2017 10 次提交
    • H
      Speed up simple queries on AOCS tables, when only a few columns are needed. · 3c40df0a
      Heikki Linnakangas 提交于
      If you have a query like "SELECT COUNT(col1) FROM wide_table", where the
      table has dozens of columns, the overhead in aocs_getnext() just to figure
      out which columns need to be fetched becomes noticeable. Optimize it.
      3c40df0a
    • H
      Reformat code. · ecc94a32
      Heikki Linnakangas 提交于
      There was a mixture of spaces and tabs being used for indentation in
      aocsam.c, and I finally got fed up with that while doing other changes in
      that file. I ran pgindent, and did a bunch of manual fixups of the
      formatting. All the changes in this commit are purely cosmetic.
      
      I did the same for appendonlyam.c, although I'm not changing it at the
      moment, to keep aocsam.c and appendonlyam.c in sync.
      ecc94a32
    • H
      Turn a couple of hazardous macros into inline functions. · 2395d803
      Heikki Linnakangas 提交于
      In aocsam.c, there's a block of code that does:
      
          if (...)
          {
              AOTupleIdInit_rowNum(...);
          }
          else
          {
              AOTupleIdInit_rowNum(...);
          }
      
      While hacking, I removed the seemingly unnecessary braces, turning that
      into just:
      
          if (...)
              AOTupleIdInit_rowNum(...);
          else
              AOTupleIdInit_rowNum(...);
      
      But then I got a compiler error, about 'else' without 'if'. I was baffled
      for a moment, until I looked at the definition of AOTupleIdInit_rowNum. The
      way it includes curly braces makes it not work in an if-else construct like
      above. These macros also have double-evaluation hazards.
      
      To make this more robust, turn the macros into static inline functions.
      Inline functions generally behave more sanely and are more readable than
      macros.
      2395d803
    • H
      Remove unused field. · 781ff5b7
      Heikki Linnakangas 提交于
      This does mean that we don't free the array quite as quickly as we used to,
      but it's a drop in the sea. The array is very small, there are much bigger
      data structures involved in evey AOCS scan that are not freed as quickly,
      and it's freed at the end of the query in any case.
      781ff5b7
    • H
      Add missing prototypes to silence compiler warnings. · 99c30c58
      Heikki Linnakangas 提交于
      Commit fa6c2d43 added two functions, but forgot to add prototypes for
      them.
      99c30c58
    • A
      gpload: log gpfdist outputs by default · 64d150e9
      Adam Lee 提交于
      Which is important for debugging customers' issues. (log level still
      matters)
      64d150e9
    • M
      Fixed gpload freezed when logging some non-unicode data · 769836cc
      Ming LI 提交于
      1. Log raw string if it can't be decoded as unicode.
      2. If similar exception issues in log(), continue processing left log with a warning.
      3. If other exception issues in CatThread, log thread exit without blocking worker process,
      and report warning "gpfdist log halt because Log Thread got an exception:".
      769836cc
    • M
      behave: make select sql longer for gpperfmon test · b325f08b
      Marbin Tan 提交于
      Create a more extensive workload for the sql to make it last longer.
      The previous sql was completing too fast and so when the actual pid read
      happens, there pid no longer exists and causes the result to be 0.
      b325f08b
    • V
      Update GPORCA version · b705a37b
      Venkatesh Raghavan 提交于
      b705a37b
    • J
      Revert "Bump Orca version number" · b3d6b0db
      Oops we broke the tests sorry :(
      This reverts commit 97db5bdd.
      b3d6b0db