1. 30 8月, 2017 1 次提交
  2. 29 8月, 2017 19 次提交
  3. 28 8月, 2017 12 次提交
    • H
      Use ereport() rather than elog(), for "expected" ERRORs. · 522c7c09
      Heikki Linnakangas 提交于
      Use ereport(), with a proper error code, for errors that are "expected" to
      happen sometimes, like missing configuration files, or network failure.
      
      That's nicer in general, but the reason I bumped into this is that internal
      error messages include a source file name and line number in GPDB, and if
      those error messages are included in the expected output of regression
      tests, those tests will fail any time you do change the file, so that the
      elog() moves around and the line number changes.
      522c7c09
    • D
      Avoid side effects in assertions · 288dde95
      Daniel Gustafsson 提交于
      An assertion with a side effect may alter the main codepath when
      the tree is built with --enable-cassert, which in turn may lead
      to subtle differences due compiler optimizations and/or straight
      bugs in the side effect. Rewrite the assertions without side
      effects to leave the main codepath intact.
      288dde95
    • P
      Enlarge the range of memory_shared_quota in tests · 46eb2c73
      Pengzhou Tang 提交于
      46eb2c73
    • P
      Add test cases under utility mode for resource group · 910036b0
      Pengzhou Tang 提交于
      This commit verified that connections in utility mode should not be
      governed by resource group
      910036b0
    • P
      Add resource group tests for cursors, pl functions and prepare/execute statements · 9392d17b
      Pengzhou Tang 提交于
      This commit verified that cursors, prepare and statements within pl functions didn't
      trigger self-deadlock by the concurrency control of resource group.
      9392d17b
    • P
      Use index scan on pg_resgroupcapability for resource group · 3fd8a618
      Pengzhou Tang 提交于
      We used to use sequence scan on pg_resgroupcapability for functions that
      need to do a full scan of pg_resgroupcapability. Problem is accessing
      in this way will take a long time after pg_resgroupcapability table was
      updated/deleted million times as our stress tests do, pg_resgroupcapability
      was filled of invalid blocks and sequence scan wasted lots of time to bypass
      those blocks. Using index scan on it can resolve this problem.
      3fd8a618
    • P
      Add parallel tests for resource group · ee1d30c9
      Pengzhou Tang 提交于
      This commit contain all kinds of parallel tests include combination of CREATE,
      DROP, ALTER and Queries, this commit depends on dblink component to run
      queries concurrently.
      Signed-off-by: NRichard Guo <riguo@pivotal.io>
      ee1d30c9
    • A
      Optimize `COPY TO ON SEGMENT` result processing · 266355d3
      Adam Lee 提交于
      Don't send nonsense '\n' characters just for counting, let segments
      report how many rows are processed instead.
      Signed-off-by: NMing LI <mli@apache.org>
      266355d3
    • X
      Add GUC to control the distribution key checking for "COPY FROM ON SEGMENT" · 6566d48c
      Xiaoran Wang 提交于
      GUC value is `gp_enable_segment_copy_checking`, its default value is true.
      User can disable the distribution key check with with a GUC value.
      Signed-off-by: NXiaoran Wang <xiwang@pivotal.io>
      6566d48c
    • X
      Check distribution key restriction for `COPY FROM ON SEGMEN` · 65321259
      Xiaoran Wang 提交于
      When use command `COPY FROM ON SEGMENT`, we copy data from
      local file to the table on the segment directly. When copying
      data, we need to apply the distribution policy on the record to compute
      the target segment. If the target segment ID isn't equal to
      current segment ID, we will report error to keep the distribution
      key restriction.
      
      Because the segment has no meta data info about table distribution policy and
      partition policy,we copy the distribution policy of main table from
      master to segment in the query plan. When the parent table and
      partitioned sub table has different distribution policy, it is difficult
      to check all the distribution key restriction in all sub tables. In this
      case , we will report error.
      
      In case of the partitioned table's distribution policy is
      RANDOMLY and different from the parent table, user can use GUC value
      `gp_enable_segment_copy_checking` to disable this check.
      
      Check the distribution key restriction as follows:
      
      1) Table isn't partioned:
          Compute the data target segment.If the data doesn't belong the
          segment, will report error.
      
      2) Table is partitioned and the distribution policy of partitioned table
      as same as the main table:
          Compute the data target segment.If the data doesn't belong
          the segment, will report error.
      
      3) Table is partitioned and the distribution policy of partitioned
      table is different from main table:
          Not support to check ,report error.
      Signed-off-by: NXiaoran Wang <xiwang@pivotal.io>
      Signed-off-by: NMing LI <mli@apache.org>
      Signed-off-by: NAdam Lee <ali@pivotal.io>
      65321259
    • H
      Add new GPDB_EXTRA_COL mechanism to process_col_defaults.pl · 215283a6
      Heikki Linnakangas 提交于
      This allows setting one of the GPDB-added attributes on a line, without
      modifying the original line. This reduces the diff of pg_proc.h from
      upstream.
      
      This has no effect on the resulting BKI file, except for whitespace. IOW,
      there are no catalog changes in this commit. I checked that by diffing the
      resulting BKI file, before and after this patch, with "diff -w".
      
      I still left the TODO comment in pg_proc.h in place, which pointed out
      that it'd be nice if we could automatically use prodataaccess = 'c' as the
      default for SQL-language columns, and 'n' for others. I actually wrote a
      more flexible prototype at first that could do that. In that prototype, you
      could provide an arbitrary perl expression that was evaluated on every row,
      and could compute a value based on other columns. But that was more
      complicated, and at the same time, not as flexible, because you could still
      not specify particular values for just one row. So I think this is better
      in the end.
      
      Also, I noticed that we haven't actually marked all SQL-language functions
      with prodataaccess = 'c'. Tsk tsk. It's too late for catalog changes, so
      not fixing that now. At some point, we should discuss whether we should
      do something different with prodataaccess, like change the code so that
      it's ignored for SQL language functions altogether. Or perhaps just remove
      the column, the only useful value for it is the magic 's' value, which
      can only be used in built-in functions because there's no DDL syntax for
      it. But that's a whole different story.
      215283a6
    • H
      Don't strip semicolon from re-constructed DATA lines in BKI sources. · e6569903
      Heikki Linnakangas 提交于
      It's harmless, as the genbki script ignores them, but seems a bit untidy.
      It also makes it harder to diff between the re-constructed DATA lines and
      the originals.
      e6569903
  4. 27 8月, 2017 1 次提交
    • D
      Ensure directory cleanup in workfile manager · 6aecdb98
      Daniel Gustafsson 提交于
      Calling elog(ERROR ..) will exit the current context, so the
      cleanup function would never run. Shift around to ensure the
      cleanup is called. This codepath was recently introduced in
      commit 00ce2c14 where a surrounding try/catch block was removed.
      
      Also change to ereport from elog since this is an error that
      a user could run into.
      6aecdb98
  5. 26 8月, 2017 7 次提交