1. 02 8月, 2019 4 次提交
  2. 01 8月, 2019 6 次提交
    • M
      docs - fixed typo and removed draft comment. · 765b5935
      mkiyama 提交于
      765b5935
    • A
      Fix gpperfmon GUC definitions · 8edce03e
      Asim R P 提交于
      GUC gp_enable_gpperfmon is defined to be set only at postmaster
      restart.  Having a check hook that checks if the process setting it
      has superuser privileges is meaningless.  The check hook is removed.
      
      GUC gp_gpperfmon_send_interval is intended to be set only by
      superuser.  Adjust its definition accordingly and leverage checks
      built into GUC framework for superuser privileges.  The check hook for
      this GUC tried to achieve the same but incorrectly.  If the check hook
      was invoked at the beginning of main query processing loop by a
      backend process, it would crash.  At the beginning of the main loop, a
      transaction is not started yet.  The check hook invokes superuser()
      interface, which performs catalog access.  Doing so without starting a
      transaction is a recipe for crashing badly.  Such a crash was observed
      in production at least once.
      
      Thank you Jesse Zhang for suggesting to remove superuser check.
      
      The patch doesn't add any tests because, after removing the check
      hooks, the checks built into GUC framework are being used.  That code
      path is well exercised by existing regression tests.
      
      Reviewed-by: Daniel Gustafsson
      (cherry picked from commit b5729a03)
      8edce03e
    • N
      Fix callers of pg_mkdir_p() · 10796e37
      Ning Yu 提交于
      Some callers of pg_mkdir_p() consider EEXIST as a non-error case, this
      is incorrect.  When pg_mkdir_p() sets errno to EEXIST it means that the
      target path already exists but is not a directory.  So as long as
      pg_mkdir_p() returns -1 we should consider it as a failure.
      Co-authored-by: NPaul Guo <pguo@pivotal.io>
      Co-authored-by: NNing Yu <nyu@pivotal.io>
      (cherry picked from commit dd6b310e)
      10796e37
    • N
      Test concurrent call to pg_mkdir_p() · e949d62a
      Ning Yu 提交于
      (cherry picked from commit c8d4e32f)
      e949d62a
    • N
      Fix race condition in pg_mkdir_p() · d7ae7272
      Ning Yu 提交于
      pg_mkdir_p() is used by initdb and pg_basebackup to create a directory
      as well as its parent directories.  The logic used to be like below:
      
          if (stat(path) < 0)
          {
              if (mkdir(path) < 0)
                  retval = -1;
          }
      
      It first checks for the existence of the path, if path does not
      pre-exist then it creates the directory.  However if two processes try
      to create path concurrently, then one possible execution order is as
      below:
      
          A: stat(path) returns -1, so decide to create it;
          B: stat(path) returns -1, so decide to create it;
          B: mkdir(path) returns 0, successfully created path;
          A: mkdir(path) returns -1, fail to create path as it already exist;
      
      This race condition could be fixed by swapping the order of stat() and
      mkdir(), this is also what the "mkdir -p" command does.
      Co-authored-by: NPaul Guo <pguo@pivotal.io>
      Co-authored-by: NNing Yu <nyu@pivotal.io>
      (cherry picked from commit bd8abd95)
      d7ae7272
    • A
      Add long flags to package_tarball.bash with TDD · bd7c01d9
      Amil Khanzada 提交于
      package_tarball.bash is used in many places outside of the gpdb
      repository so any modifications should be done very carefully.
      
      This commit also introduces package_tarball.bats as an example file for
      other concourse users wishing to add .bats files.
      Authored-by: NAmil Khanzada <akhanzada@pivotal.io>
      Reviewed-by: NMark Sliva <msliva@pivotal.io>
      (cherry picked from commit 434e5e3d)
      bd7c01d9
  3. 31 7月, 2019 5 次提交
  4. 30 7月, 2019 9 次提交
  5. 29 7月, 2019 3 次提交
    • A
      Add flag to pg_regress to display failure diffs on stdout. · 639a3d99
      Adam Berlin 提交于
      When given --print-failure-diffs, pg_regress prints the contents of
      regression.diffs after a failure.
      
      (cherry picked from commit b5365010)
      
      Print pg_regress failure diffs using fgets.
      
      (cherry picked from commit 99e54168)
      639a3d99
    • X
      Disbale test cases of gpfdist_ssl · 14e2606f
      Xiaoran Wang 提交于
      The test cases of gpfdist_ssl sometimes
      fail on pipeline. We don't know the root
      cause yet. So just disable them. And we will
      enable them after fixing.
      14e2606f
    • A
      Save the complete slot data in ExecMaterializeSlot() · 0739e37d
      Adam Lee 提交于
      ExecMaterializeSlot() transformed any tuple to a virtual tuple via
      slot_getallattrs(), then formed a heaptuple from it, ctid was lost here
      since virtual tuples have no system columns.
      
      This commit copies the entire htup directly if we have a regular
      physical tuple but not locally palloc'd.
      
      (cherry picked from commit 1eeae2e9)
      0739e37d
  6. 27 7月, 2019 2 次提交
  7. 26 7月, 2019 9 次提交
  8. 25 7月, 2019 2 次提交
    • H
      Fix confusion between CURSOR_OPT_GENERIC_PLAN and CURSOR_OPT_UPDATABLE. · 1b3cc70c
      Heikki Linnakangas 提交于
      The PostgreSQL 9.2 merge introduced a couple of new cursor options,
      including CURSOR_OPT_GENERIC_PLAN, which clashed with the 0x0040 value that
      we were already using in GPDB for the GPDB-specific CURSOR_OPT_UPDATABLE
      option. Fix the conflict.
      
      The CURSOR_OPT_UPDATABLE flag was used in cursors opened in PL/pgSQL, so
      the mixup caused generic plans to be used for all PL/pgSQL cursors. Add
      a test case for that.
      
      The PostgreSQL 9.2 merge happened in GPDB 6, so backport to GPDB 6.
      Reviewed-by: NAsim R P <apraveen@pivotal.io>
      Reviewed-by: NPengzhou Tang <ptang@pivotal.io>
      1b3cc70c
    • A
      Infinitely disable fts during gp_tablespace_with_faults · 9f6004f2
      Adam Berlin 提交于
      Ooops.
      
      We only injected the skip fault for fts once, causing a race condition
      in the test. Here's the problematic timeline:
      
      1. Inject skip fault for fts
      2. Fts runs, skip fault is gone
      3. Panic primary
      4. Inject Noop record into mirror
      5. Promote mirror
      6. Noop record never replayed and test fails.
      
      (cherry picked from commit f2ca17a0)
      9f6004f2