1. 04 8月, 2017 3 次提交
  2. 03 8月, 2017 15 次提交
    • N
      Fix resource group memory overuse issue when increasing concurrency. · 94a08704
      Ning Yu 提交于
      Resource group may have memory overuse in below case:
      
      	CREATE RESOURCE GROUP rg_concurrency_test WITH
      	(concurrency=1, cpu_rate_limit=20, memory_limit=60,
      	 memory_shared_quota=0, memory_spill_ratio=10);
      	CREATE ROLE role_concurrency_test RESOURCE GROUP rg_concurrency_test;
      
      	11:SET ROLE role_concurrency_test;
      	11:BEGIN;
      
      	21:SET ROLE role_concurrency_test;
      	22:SET ROLE role_concurrency_test;
      	21&:BEGIN;
      	22&:BEGIN;
      
      	ALTER RESOURCE GROUP rg_concurrency_test SET CONCURRENCY 2;
      
      	11:END;
      
      The cause is that we didn't check overall memory quota usage in the
      past, so pending queries can be waken up as long as the concurrency
      limit is not reached, in such a case if the currently running tranctions
      have used all the memory quota in the resource group then the overall
      memory usage will be exceeded.
      
      To fix this issue we now checks both concurrency limit and memory quota
      usage to decide whether to wake up pending queries.
      Signed-off-by: NZhenghua Lyu <zlv@pivotal.io>
      94a08704
    • H
      759c19d0
    • M
      Fixed 'COPY table FROM file ON SEGMENT' bug: multiple blocks file only read the first block (#2869) · 29bf1d53
      Ming LI 提交于
      This bug is caused by:
      For COPY FROM ON SEGMENT, on QE, process the data stream (empty) dispatched from QD at first, then re-do the same workflow to read and process the local segment data file. Before redo, all flags need to be reset to initial values too. However we missed one flag.
      29bf1d53
    • X
      Mask out checksum in gpcheckmirrorseg.pl · 634858cd
      Xin Zhang 提交于
      Add the checksum masking and clearly separate where that masking is applied
      separately from when the lp array masking is applied.
      
      This will ensure the data in buf only updated once.
      Signed-off-by: NC.J. Jameson <cjameson@pivotal.io>
      634858cd
    • X
      Add checksum verification on mirror of filerep resync · 51ff21af
      Xin Zhang 提交于
      Validate every BufferPool page sent to the mirror by the
      primary prior to writing.
      Signed-off-by: NTaylor Vesely <tvesely@pivotal.io>
      51ff21af
    • T
      Fix filerep checksum bug. · e24eff92
      Taylor Vesely 提交于
      During resync, filerep copied block with out-of-date checksum over from primary
      to mirror. This caused checksum verification failure later on the mirror side,
      and also caused inconsistency between the two on disk images of primary and
      mirror.
      
      The fix introduced here will always recompute the checksum during resync.
      
      The performance impact is very low, since we only recompute the checksum for
      changed blocks. However, for the full copy, we will recompute checksum for all
      the blocks to be copied. We have to do it, because there is no easy way to
      gurantee there no other changes like hint bit change during resync, since it's
      an online operation.
      
      Also fixed wrong comments regarding to page lsn.
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      e24eff92
    • S
      Fix checksums for CLUSTER, VACUUM FULL etc. · 058527bc
      Simon Riggs 提交于
      In CLUSTER, VACUUM FULL and ALTER TABLE SET TABLESPACE
      I erroneously set checksum before log_newpage, which
      sets the LSN and invalidates the checksum. So set
      checksum immediately *after* log_newpage.
      
      Bug report Fujii Masao, Fix and patch by Jeff Davis
      
      (cherry picked from commit cf8dc9e1)
      058527bc
    • T
      Suppress uninitialized-variable warning in new checksum code. · cbb4795e
      Tom Lane 提交于
      Some compilers understand that this coding is safe, and some don't.
      
      (cherry picked from commit 4912385b)
      Signed-off-by: NTaylor Vesely <tvesely@pivotal.io>
      cbb4795e
    • S
      Add new README file for pages/checksums · 696816bb
      Simon Riggs 提交于
      (cherry picked from commit 9df56f6d)
      696816bb
    • A
      Bug Fix of checksum for `create database` · 44ea018d
      Asim R P 提交于
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      44ea018d
    • A
      Add test for heap checksums · da3178dd
      Abhijit Subramanya 提交于
      This test is based on ao_checksum_corruption.sql.
      
      We added new UDF `invalidate_buffers()` to invalidate buffers for given
      relation, so that we can read the content from the corrupted file again.
      
      We tested corruptions on heap table, toast table, btree and bitmap indexes.
      Signed-off-by: NXin Zhang <xzhang@pivotal.io>
      da3178dd
    • N
      Adding HEAP_CHECKSUM to gpinitsystem · ee53d9ab
      Nadeem Ghani 提交于
      This is a new config option, on by default.
      Signed-off-by: NMarbin Tan <mtan@pivotal.io>
      ee53d9ab
    • S
      Allow I/O reliability checks using 16-bit checksums · ed0efd2a
      Simon Riggs 提交于
      Checksums are set immediately prior to flush out of shared buffers
      and checked when pages are read in again. Hint bit setting will
      require full page write when block is dirtied, which causes various
      infrastructure changes. Extensive comments, docs and README.
      
      WARNING message thrown if checksum fails on non-all zeroes page;
      ERROR thrown but can be disabled with ignore_checksum_failure = on.
      
      Feature enabled by an initdb option, since transition from option off
      to option on is long and complex and has not yet been implemented.
      Default is not to use checksums.
      
      Checksum used is WAL CRC-32 truncated to 16-bits.
      
      Simon Riggs, Jeff Davis, Greg Smith
      Wide input and assistance from many community members. Thank you.
      
      (cherry picked from commit 96ef3b8f)
      ed0efd2a
    • S
      Remove PageSetTLI and rename pd_tli to pd_checksum · 626df6b4
      Simon Riggs 提交于
      Remove use of PageSetTLI() from all page manipulation functions
      and adjust README to indicate change in the way we make changes
      to pages. Repurpose those bytes into the pd_checksum field and
      explain how that works in comments about page header.
      
      Refactoring ahead of actual feature patch which would make use
      of the checksum field, arriving later.
      
      Jeff Davis, with comments and doc changes by Simon Riggs
      Direction suggested by Robert Haas; many others providing
      review comments.
      
      (cherry picked from bb7cc262)
      626df6b4
    • B
      Fix memory leak while print missing column stats · 71752344
      Bhuvnesh Chaudhary 提交于
      Relation metadata reference was added twice due to which
      memory leak is detected and PQO fallsback to planner. This patch
      removes redundant AddRef for Relation Metadata and fixes fallback.
      Signed-off-by: NEkta Khanna <ekhanna@pivotal.io>
      71752344
  3. 02 8月, 2017 9 次提交
  4. 01 8月, 2017 7 次提交
  5. 31 7月, 2017 6 次提交