1. 11 5月, 2017 14 次提交
    • K
      Limit the optimizer mdcache default size to 16MB. · 15b97158
      Karthikeyan Jambu Rajaraman 提交于
      Based on the experiments with tpch and tpcds, we found that 16MB would
      be the optimal size of mdcache.
      [#96490982].
      15b97158
    • A
      Perform cleanup phase even if open relation failed during drop phase of vacuum. · b3abb1b7
      Vacuum of AO tables happens in four phases: prepare, compact, drop and cleanup.
      When there are concurrent transactions executing vacuum on AO tables, if one of
      the vacuum transaction is executing a drop phase, the other transaction will
      not be able to open the relation if it is also executing the drop phase. When
      the relation open fails, vacuum simply exits without performing the cleanup
      phase. The relfrozenxid in pg_class is updated during the cleanup phase and
      hence the age of the table does not get reduced. This becomes a problem because
      the age of the database does not reduce and eventually the xid wraparound issue
      will be encountered.
      
      This problem is fixed by performing the cleanup phase even if the open relation
      fails during drop phase.
      b3abb1b7
    • J
      Properly get smallest eof column during ADD COLUMN on AOCO table · b1a1d190
      Jimmy Yih 提交于
      The column_to_scan function used to get the smallest eof column was
      operating incorrectly. It would loop the segfiles until it found a
      segfile with nonzero tuplecount, grab the first column that has a
      nonzero eof, and return that value. The issue here is that it did not
      iterate through all the columns to find the smallest nonzero eof. With
      this commit, we now loop through all the columns of the segfile to
      decide on a column to return. The unit tests for this function were
      also incorrect so we fix that in this commit too.
      b1a1d190
    • J
      VACUUM should cleanup aosegs/aocssegs in AOSEG_STATE_AWAITING_DROP state · cdc8172a
      Jimmy Yih 提交于
      Due to the different phases of VACUUM, compaction phase could have
      committed but the drop was cancelled. This could leave some
      aoseg/aocsseg entries in AOSEG_STATE_AWAITING_DROP state which could
      then be cleaned up in a subsequent VACUUM as expected... but it
      currently just skips. The master keeps a hash table (AppendOnlyHash)
      and uses it during VACUUM to check tuple count, state, and
      aborted/committed. Our issue here is that state checking was only
      being done against state AWAITING_DROP_READY. It was not including
      COMPACTED_AWAITING_DROP in the state check. This commit adds the check
      and updates the detailed comment block on the state transitions in
      appendonlywriter.h.
      cdc8172a
    • J
      ADD COLUMN on an AOCO table should check and drop aocssegs in await drop · 930b2c38
      Jimmy Yih 提交于
      When doing an ADD COLUMN operation on an AOCO table, the vpinfo byte
      array stored in the aocsseg auxiliary table for each column is updated
      to add an extra vpinfo index to match the relnatts value in
      pg_class. However, entries in the aocsseg auxiliary table with state 2
      (AOSEG_STATE_AWAITING_DROP) will not have their vpinfo byte array
      updated. Subsequent calls to getAOCSVPEntry function will then fail
      due to the vpinfo size does not match the relnatts value in pg_class
      (e.g. persistent table rebuild). Since we have the AccessExclusiveLock
      on the table during ADD COLUMN, we might as well schedule the drop
      before the vpinfos are updated to prevent any inconsistency issues.
      930b2c38
    • J
      Fix lazy VACUUM to not wait for AccessExclusiveLock during drop phase · 05f55e86
      Jimmy Yih 提交于
      We expect lazy VACUUM to skip drop phase if it cannot acquire the
      relation's AccessExclusiveLock. This commit properly sets the dontWait
      flag to True when calling try_relation_open during drop phase. We also
      change the dontWait part of try_relation_open to not error out because
      callers should be the ones to handle an invalid relation.
      05f55e86
    • J
      Adds a check for orca libraries [#138725549] · ad470347
      Jesse Zhang and Omer Arap 提交于
      If GPDB is configured to build with orca, this commit adds checks to
      ensure orca libraries are available.
      ad470347
    • J
      Move ORCA header checks into orca.m4 [#138725549] · 7a016999
      Jesse Zhang and Omer Arap 提交于
      We also chose more representative headers for the checks.
      7a016999
    • J
      Adds a check for Greenplum patched Xerces [#138725549] · 94afeb62
      Jesse Zhang and Omer Arap 提交于
      If gpdb is configured to build with orca it requires a Greenplum patched
      version of Xerces library. This commit adds an explicit check for the
      patched Xerces.
      
      This also gives us an opportunity to be more idiomatic in doing
      autoconf: we are replacing the manual manipulation of LIBS in
      src/backend/Makefile with `AC_CHECK_LIB` in `configure.in`.
      94afeb62
    • O
      pipeline changes to make orca default [#138725549] · b6d75a3b
      Omer Arap 提交于
      b6d75a3b
    • E
      Set optimizer GUC to on by default · 5646ada2
      Ekta Khanna 提交于
      When the GPDB is build with GPORCA, `optimizer` GUC is set to on
      by default. If GPDB is not build with GPORCA this guc is off by default.
      Signed-off-by: NOmer Arap <oarap@pivotal.io>
      5646ada2
    • E
      Compile ORCA by default in GPDB [#138725549] · 228a22f8
      Ekta Khanna 提交于
      This changes autoconf to enable orca by default. To be clear, the twin
      flags of `--enable-orca` and `--disable-orca` are already available,
      this commit merely changes the default (and help messages accordingly).
      Signed-off-by: NOmer Arap <oarap@pivotal.io>
      228a22f8
    • H
      Remove unused subplans · 574d352a
      Haisheng Yuan 提交于
      As of commit c7ff7663, subplans are initialized even they are unused. In some
      case, the generated subplan is not used, but it has motionId = 0, which breaks
      executor's sanity check. This patch fixes the issue by removing unused
      subplans.
      
      See discussions at:
      https://github.com/greenplum-db/gpdb/issues/2383
      574d352a
    • L
      clarify when MASTER_DATA_DIRECTORY is used/not (#2405) · 831b94f8
      Lisa Owen 提交于
      831b94f8
  2. 10 5月, 2017 13 次提交
  3. 09 5月, 2017 9 次提交
    • R
      pgcrypto: Code cleanup for decrypt_internal. · 36043ca3
      Robert Haas 提交于
      Remove some unnecessary null-tests, and replace a goto-label construct
      with an "if" block.
      
      Michael Paquier, reviewed by me.
      36043ca3
    • T
      Fix Coverity warning about contrib/pgcrypto's mdc_finish(). · 6e10ddde
      Tom Lane 提交于
      Coverity points out that mdc_finish returns a pointer to a local buffer
      (which of course is gone as soon as the function returns), leaving open
      a risk of misbehaviors possibly as bad as a stack overwrite.
      
      In reality, the only possible call site is in process_data_packets()
      which does not examine the returned pointer at all.  So there's no
      live bug, but nonetheless the code is confusing and risky.  Refactor
      to avoid the issue by letting process_data_packets() call mdc_finish()
      directly instead of going through the pullf_read() API.
      
      Although this is only cosmetic, it seems good to back-patch so that
      the logic in pgp-decrypt.c stays in sync across all branches.
      
      Marko Kreen
      6e10ddde
    • D
      Fix typos in partition test · b0f82526
      Daniel Gustafsson 提交于
      b0f82526
    • K
      sourceTag missed in plan cache · 66abeaa4
      Kenan Yao 提交于
      We were not storing sourceTag in CachedPlanSource, so if a cached plan
      is used later, that field is broken, and would break resource queue
      concurrency limit functionality for example.
      
      Reported by issue #2308 when using JDBC/ODBC
      66abeaa4
    • D
      docs typo fix: idle_state -> idle_start · e1dec1b1
      David Yozie 提交于
      e1dec1b1
    • L
      docs - add plan cache invalidation info (#2292) · c7415020
      Lisa Owen 提交于
      * docs - add plan cache invalidation info
      
      * use correct postgres version, remove reuse statement
      c7415020
    • D
      Bump ORCA version to v2.30.0 · 41f2b966
      Dhanashree Kashid 提交于
      Signed-off-by: NJesse Zhang <sbjesse@gmail.com>
      41f2b966
    • K
      Fix coverity issues in execHHashagg.c · 95704aae
      Kavinder Dhaliwal 提交于
      CID 167715: Incorrect Expression (UNINTENDED_INTEGER_DIVISION)
      Covertiy reported that a division operation of two integers is then
      converted to a double. This would cause any fractional part of the
      quotient to be lost. This is fixed by casting the divisor to a double
      before the division.
      
      CID 167714: Dereference before null check (REVERSE_INULL)
      Coverity reported that a null check is unnecessary because the pointer
      spill_file->file_info is dereferenced before this line in every code
      path. This issue is fixed by removing the null pointer check
      95704aae
    • K
      Skip squelchNodeWalker when there is a SharedInputScan that is shared within the same slice · a030149b
      Kavinder Dhaliwal 提交于
      This commit fixes a bug where a SharedInputScan with a Redistribute
      Motion in its subtree that is also shared within the same slice may not
      execute the SharedInputScan and stop the Motion prematurely. To avoid
      this issue squelchNodeWalker() short-circuits if it comes across a
      ShareInputScan in its subtree that is shared within the same slice
      a030149b
  4. 08 5月, 2017 1 次提交
    • N
      Fix several gpload tests' issues · b36cf2da
      Ning Wu 提交于
      0, default database doesn't exist in some env.
      1, reports good even the cases failed.
      2, init_file ignores too many lines.
      
      This commit fixes these.
      b36cf2da
  5. 06 5月, 2017 3 次提交
    • D
      Fix shared object compilation outside Makefile.shlib · f9dd996d
      Daniel Gustafsson 提交于
      This is a partial backport of f9e9da66 from upstream needed
      to get contrib/orca_debug building on macOS:
      
        commit f9e9da66
        Author: Tom Lane <tgl@sss.pgh.pa.us>
        Date:   Mon Jul 5 23:15:56 2010 +0000
      
      	Fix a few single-file (MODULES, not MODULE_big) contrib makefiles that were
      	supposing that they should set SHLIB_LINK rather than LDFLAGS_SL.  Since these
      	don't go through Makefile.shlib that was a no-op on most platforms.  Also
      	regularize the few platform-specific Makefiles that did pay attention to
      	SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS,
      	so do that instead.  Per buildfarm failures on cygwin.
      f9dd996d
    • D
      Make orca_debug module compile · 01725fc7
      Daniel Gustafsson 提交于
      The orca_debug contrib module was in disrepair and no longer
      compiled due to changes in the version strings. Fix the code
      and also add the proper libraries to link against to give the
      .so a fighting chance to compile. Override the compiler in the
      Makefile to use a C++ compiler instead.
      
      Functions already compiled in when building GPDB with Orca were
      removed, missing prototypes added and an unused function removed.
      This allows orca_debug to compile without warnings.
      01725fc7
    • C
      02b258a1