1. 26 4月, 2018 7 次提交
  2. 25 4月, 2018 6 次提交
    • B
      Fix pushing of quals containing window functions · a802eb2f
      Bhuvnesh Chaudhary 提交于
      Fix qual_is_pushdown_safe_set_operation to correctly resolve the
      qual vars and identify if there are any window references in the top
      level of the set operation's left or right subqueries. Before commit
      b8002a9, instead of starting with rte of the level where the qual is
      attached we started scanning the rte of the subqueries of the left and
      right args of setop to identify the qual. However, because of this the
      varno didn't match to the corresponding RTE due to which the quals
      couldn't be resolved to winref and were incorrectly pushed down. This
      caused the planner to return an error during execution.
      a802eb2f
    • A
      Fix fts_unblock_primary answer file. · 01adf026
      Ashwin Agrawal 提交于
      Remove the extra WARNING only gets generated for MAC.
      01adf026
    • D
      Fix ftsprobe during walsender state is startup · 17979ee0
      David Kimura 提交于
      Commit 90ce5138 changed the logic for
      calculating grace period. Previously the variable marked_pid_zero_at_time was
      set to zero every time PID was set to valid value. With this changed logic the
      grace period is calculated even when PID is not zero (walsender state=startup).
      This resulted in FailedAssertion(!(walsnd->marked_pid_zero_at_time)). Now
      instead of resetting marked_pid_zero_at_time when the PID is set to valid
      value, we reset whenever walsender state changes to catchup or streaming.
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      17979ee0
    • D
      Always check grace period when reporting mirror down · 90ce5138
      David Kimura 提交于
      When pid is not 0 and state is WALSNDSTATE_STARTUP mirror gets reported as down
      without consulting the grace period. Hence refactor the logic to check for
      grace period any time before replying to FTS that mirror is down. This was one
      of the cases reported in CI possibly causing walrep_1 job to be flaky.
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      90ce5138
    • O
      Revert "Fix pushing of quals containing window functions" · 9da1ae4c
      Omer Arap 提交于
      This reverts commit 22f5b7fa.
      
      There are plan changes so reverting it. Somehow, didn't get catpured in
      local testing.
      9da1ae4c
    • B
      Fix pushing of quals containing window functions · 22f5b7fa
      Bhuvnesh Chaudhary 提交于
      Fix qual_is_pushdown_safe_set_operation to correctly resolve the
      qual vars and identify if there are any window references in the top
      level of the set operation's left or right subqueries. Before commit
      b8002a9, instead of starting with rte of the level where the qual is
      attached we started scanning the rte of the subqueries of the left and
      right args of setop to identify the qual. However, because of this the
      varno didn't match to the corresponding RTE due to which the quals
      couldn't be resolved to winref and were incorrectly pushed down. This
      caused the planner to return an error during execution.
      22f5b7fa
  3. 24 4月, 2018 7 次提交
  4. 23 4月, 2018 1 次提交
  5. 21 4月, 2018 1 次提交
  6. 19 4月, 2018 10 次提交
    • D
      Speed up dispatcher detection of segment state changes · 85101317
      David Kimura 提交于
      Dispatcher has DISPATCH_WAIT_TIMEOUT_MSEC (current value is 2000) as poll
      timeout. It waited for 30 iterations of poll to timeout before checking the
      segment status. And then initiated fts probe before checking the segment
      status. As a result it took ~minute for query to fail in case of segment
      failures.
      
      This commit updates to check segment status on every poll timeout. It also
      leverages fts version to optimize whether to check segments. It avoids
      performing fts probe, instead it relies on fts to be called on regular
      intervals and provide cached results.
      
      With this change test time for twophase_tolerance_with_mirror_promotion was cut
      down by ~2 minutes.
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      85101317
    • D
      Add tests to cover mirror promotion scenario · 19e0f385
      David Kimura 提交于
      The goal of these tests is to validate that existing transactions on the
      primary are not hung when the mirror gets promoted. In order to validate
      this, mirror promotion is triggered at the following two-phase commit
      points:
        1) if the transaction hasn't prepared, then it should be aborted
        2) if the transaction is already prepared, then it should complete commit
           on the mirror
        3) if the transaction has committed on the primary, but not acknowledged
           to the master then it should complete the commit on the mirror
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      19e0f385
    • A
      Pull start_prepare fault before HOLD_INTERRUPTS. · ec8aa4e9
      Ashwin Agrawal 提交于
      Sometimes test need to use this fault to suspend and then stop the database. If
      this fault is inside the HOLD_INTERRUPTS (which is where its before this
      change), CHECK_FOR_INTERRUPTS doesn't do anything. Hence stopping of segment
      takes super long time as kill -9 needs to be enforced by gpstop after timeout.
      Co-authored-by: NDavid Kimura <dkimura@pivotal.io>
      ec8aa4e9
    • N
      resgroup: fix an access to uninitialized address. · 56c20709
      Ning Yu 提交于
      In ResGroupDropFinish() uninitialized memory address can be accessed due
      to some reasons:
      
      1. the group pointer is not initialized on segments;
      2. the hash table node pointed by group is recycled in removeGroup();
      
      This invalid access can cause crash issue on segments.
      
      Also move some global vars to resgroup.c,
      They were put in resgroup-ops-linux.c, which was only compiled and
      linked on linux, so on other OS like macos the vars can not be found.
      56c20709
    • N
      ic: Mark binary_swap_gpdb as optional input for resgroup jobs. · 9b3d0cfc
      Ning Yu 提交于
      binary_swap_gpdb was input of all resgroup jobs, but as it's not `get` by the resgroup sles job an error will be triggered:
      
          missing inputs: binary_swap_gpdb
      
      Fixed by marking it as optional.
      9b3d0cfc
    • J
      User query can use global shared memory across resource group when... · 3be31490
      Jialun 提交于
      User query can use global shared memory across resource group when available(Same as the PR 4843, just made the test cases stable) (#4866)
      
      1) Global shared memory will be used if the query has run out of
      	the group shared memory.
      2) The limit of memory_spill_ratio changes to [0, INT_MAX], because
      	global shared memory can be allocated, 100% limitation is not
      	make sense.
      3) Using Atomic Operation & "Compare And Save" instead of lock to
      	get high performance.
      4) Modify the test cases according to the new rules.
      3be31490
    • N
      resgroup: fix a boot failure when cgroup is not mounted. · 4c8f28b0
      Ning Yu 提交于
      Cgroup mount point is detected during startup, but due to a bug the
      mount point was used even if cgroup is not mounted at all.
      
      Fixed by correcting the checking logic.
      4c8f28b0
    • N
      resgroup: backward compatibility for memory auditor · f2f86174
      Ning Yu 提交于
      Memory auditor was a new feature introduced to allow external components
      (e.g. pl/container) managed by resource group.  This feature requires a
      new gpdb dir to be created in cgroup memory controller, however on 5X
      branch unless the users created this new dir manually then the upgrade
      from a previous version would fail.
      
      In this commit we provide backward compatibility by checking the release
      version:
      
      - on 6X and master branches the memory auditor feature is always enabled
        so the new gpdb dir is mandatory;
      - on 5X branch only if the new gpdb dir is created with proper
        permissions the memory auditor feature could be enabled, when it's
        disabled `CREATE RESOURCE GROUP WITH (memory_auditor='cgroup') will fail
        with guide information on how to enable it;
      
      Binary swap tests are also provided to verify backward compatibility in
      future releases.  As cgroup need to be configured to enable resgroup we
      split the resgroup binary swap tests into two parts:
      
      - resqueue mode only tests which can be triggered in the
        icw_gporca_centos6 pipeline job after the ICW tests, these parts have
        no requirements on cgroup;
      - complete resqueue & resgroup modes tests which can be triggered in the
        mpp_resource_group_centos{6,7} pipeline jobs after the resgroup tests,
        these parts need cgroup to be properly configured;
      f2f86174
    • B
      Add the new column stainherit in minirepro dumps · b5f09a7f
      Bhuvnesh Chaudhary 提交于
      This commit includes the stainherit columns in minirepro output recently
      added.
      b5f09a7f
    • O
      Fix gpsd to account newly added column to pg_statistic · 0140612c
      Omer Arap 提交于
      Recent postgres merge introduced a new column `stainherit` to
      `pg_statistic` table. When `gpsd` dumps the pg_statistic not only a
      column is missing but also all the other columns are shifted and saved
      in wrong column index. This causes failure on reloading the gpsd.
      
      This commit fixes the issue and adds the missing column.
      0140612c
  7. 18 4月, 2018 1 次提交
    • T
      Build backend/parser/scan.l and interfaces/ecpg/preproc/pgc.l standalone. · fa3ec7b2
      Tom Lane 提交于
      We are developing on a machine with flex 2.6.4 and we couldn't build.
      This was fixed in 72b1e3a2 in upstream (9.6 at the time) in 2016, but
      wasn't backported to 9.1 or older.
      
      Original commit message:
      > Now that we know about the %top{} trick, we can revert to building flex
      > lexers as separate .o files.  This is worth doing for a couple of reasons
      > besides sheer cleanliness.  We can narrow the scope of the -Wno-error flag
      > that's forced on scan.c.  Also, since these grammar and lexer files are
      > so large, splitting them into separate build targets should have some
      > advantages in build speed, particularly in parallel or ccache'd builds.
      >
      > We have quite a few other .l files that could be changed likewise, but the
      > above arguments don't apply to them, so the benefit of fixing them seems
      > pretty minimal.  Leave the rest for some other day.
      
      (cherry picked from commit 72b1e3a2)
      
      Fixes greenplum-db/gpdb#4863
      Co-authored-by: NJesse Zhang <sbjesse@gmail.com>
      Co-authored-by: NAsim R P <apraveen@pivotal.io>
      fa3ec7b2
  8. 17 4月, 2018 7 次提交