1. 24 4月, 2018 6 次提交
  2. 23 4月, 2018 1 次提交
  3. 21 4月, 2018 1 次提交
  4. 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
  5. 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
  6. 17 4月, 2018 7 次提交
  7. 14 4月, 2018 4 次提交
    • A
      Remove AppendOnlyStorage_GetUsableBlockSize(). · 0a119de3
      Ashwin Agrawal 提交于
      When the blocksize is 2MB, the function AppendOnlyStorage_GetUsableBlockSize
      would give out the wrong usable block size. The expected result is 2MB. But the
      return value of the function call would give out (2M -4). This is because the
      macro AOSmallContentHeader_MaxLength is defined as (2M -1). After rounding down
      to 4 byte aligned, the result is (2M - 4).
      
      Without the fix can encounter errors as follows: "ERROR: Used length 2097152
      greater than bufferLen 2097148 at position 8388592 in table 'xxxx'".
      
      Also removed some related, but unused macro variables, just for cleaning up
      codes related to AO storage.
      Co-authored-by: NLirong Jian <jian@hashdata.cn>
      0a119de3
    • A
      Use relmapping file in gp_replica_check. · da277082
      Ashwin Agrawal 提交于
      commit b9b8831a introduced "relation mapping"
      infrastructure, which stores relfilenode as "0" in pg_class for shared and
      nailed catalog tables. The actual relfilenode is stored in separate file which
      provides mapping from OID to relfilenode. gp_replica_check builds hashtable for
      relfilnodes to perform lookup for actual files on-disk. So, while populating
      this hashtable, consult relmap file to get relfilenode for tables with
      relfilenode = 0.
      
      This should help avoid seeing WARNINGs like "relfilenode XXXX not present in
      primary's pg_class" or "found extra unknown file on mirror:" for
      gp_replica_check.
      Co-authored-by: NDavid Kimura <dkimura@pivotal.io>
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      da277082
    • V
      Remove FIXME in statistic computation of planner · b7abfcbf
      Venkatesh Raghavan 提交于
      Changes in 8.4 for statistics computation is comprehensive.
      Will fix any fallouts of this change as we observe them.
      Current tests show that things are kosher so removing the fix me.
      b7abfcbf
    • B
      Bump ORCA to v2.55.19 · 9a70b244
      Bhuvnesh Chaudhary 提交于
      9a70b244
  8. 13 4月, 2018 10 次提交