1. 08 4月, 2020 9 次提交
    • C
      45719ddd
    • C
      Modify CI infrastructure and remove no longer needed pipelines/scripts/files · 40dead81
      Chris Hajas 提交于
      The main change here is that we completely get rid of the ORCA prod
      pipeline, as there's no need to create a tag/publish artifacts anymore.
      
      We also now build and test the orca unit tests during the compile step.
      
      Additionally, I've refactored the orca-dev "slack command" pipeline to
      use the canonical compile_gpdb.bash script and based the pipeline off
      the existing PR pipeline. This simplifies the `test_orca_pipeline.yml`
      file significantly and it now doesn't rely on custom scripts.
      
      There are still quite a few files in the concourse directory that are
      used by the `test_explain_pipeline.yml` and a couple of pipelines that
      are external to this repo. Some of these aren't actively being used and
      need to be cleaned up/removed, but I'll leave that for a later time.
      
      Also, uses https for xerces-c download and checks hash to ensure correct
      download.
      40dead81
    • C
      Fix configure and cmake to build ORCA with debug · 3f3f4a57
      Chris Hajas 提交于
      Previously, we used a config file that was modified by cmake. Instead,
      use configure to modify macros. Additionally use a compile definition in
      cmake so we don't need a separate config file in gpos.
      
      This also enables compile-time warnings in the src/backend/gporca files. C++ files
      in the translator never had these warnings enabled, and so are not
      enabled in src/backend/gpopt. A block of unused code is removed to get
      pass the compile warnings.
      3f3f4a57
    • C
      Remove solaris and 32-bit specific code · 4c2ee984
      Chris Hajas 提交于
      This simplifies some of the cmake files further.
      4c2ee984
    • C
      Remove install targets from CMake files · 0e6e8fb6
      Chris Hajas 提交于
      Cmake should only build targets for use with gporca_test. GNU make
      should build orca within GPDB. Remove the install target to decrease the
      chance for confusion.
      
      Also, add makefile to test directory so make clean works.
      0e6e8fb6
    • S
      Remove concept of ORCA versioning · fe52fe86
      Shreedhar Hardikar 提交于
      ORCA doesn't need a specific version anymore.
      
      A query plan will now look like:
      ```
                      QUERY PLAN
      ------------------------------------------
       Result  (cost=0.00..0.00 rows=1 width=1)
       Optimizer: Pivotal Optimizer (GPORCA)
      (2 rows)
      ```
      
      Update regression tests affected by this change.
      
      Additionally, use g++ for compiling mock unit tests since we're linking
      c++ files.
      fe52fe86
    • S
      Update Makefiles to build ORCA using GNU make · 18d2b6fb
      Shreedhar Hardikar 提交于
      ORCA previously was built into a shared library using cmake. Now, we
      build ORCA into the postgres binary.
      18d2b6fb
    • S
      Remove ORCA specific configure checks · bda1f031
      Shreedhar Hardikar 提交于
      We no longer need to check for ORCA libraries or version, as ORCA now
      exists in the same repo and the concept of a version is not needed.
      bda1f031
    • C
      Merge ORCA source tree into GPDB · 427cd25f
      Chris Hajas 提交于
      ORCA currently exists as a standalone repo. However, it requires
      significant coordination to build GPDB with ORCA or make changes to
      ORCA. With these commits, we get rid of the versioning concept, which
      hopefully will make both building and developing on ORCA much easier
      (and you won't hit version mismatch issues anymore)
      
      The GPDB build process will now also build ORCA using make. If you want
      to run the ORCA unit tests, those will continue to use cmake/ctest.
      Cmake will not install ORCA or build ORCA with GPDB, it is only used to
      run ORCA unit tests.
      
      This merge commit includes all ORCA commits from when ORCA was
      open-sourced until f6044123 (v3.97.1)
      
      This commit was generated using `git subtree add -P src/backend/gporca
      git@github.com:greenplum-db/gporca.git HEAD`.
      
      Add 'src/backend/gporca/' from commit 'f6044123'
      git-subtree-dir: src/backend/gporca
      git-subtree-mainline: b6fbabdb
      git-subtree-split: f6044123
      
      Discussion: https://groups.google.com/a/greenplum.org/d/msg/gpdb-dev/q4g73r6Y_qA/OpZXDFFwAwAJ
      427cd25f
  2. 07 4月, 2020 1 次提交
  3. 04 4月, 2020 1 次提交
    • L
      docs WIP - add some python3 info? (#9869) · 8e97737c
      Lisa Owen 提交于
      * docs WIP - add some python3 info
      
      * move data type mapping to pl/python page; add more py3 info
      
      * add set-returning function example
      
      * address comments from david
      8e97737c
  4. 03 4月, 2020 6 次提交
  5. 02 4月, 2020 5 次提交
    • W
      Partial revert Sharedsnapshot refactor PR (#9845) · 6e98844f
      Weinan WANG 提交于
      * Revert "Refactor Sharedsnapshot"
      
      This reverts commit cfc911d8.
      
      we create a DSM for sharedsnapshot synchronization between writer and reader. the DSM lifecycle is the same as a session, which we use dsm_ping_maping to mark dsm_segment.
      
      However, in centos 6, the DSM will randomly be free after some test cases even the session does not exist. It seems to related to dsm itself.
      
      Partially revert this part of the code. still left shared snapshot dump to DSM.
      
      * Dump sharedsnapshot to DSM
      
      Cursor writer gang dump snapshot using dsm instead of BufFile. A loop
      buffer is kept in Sharedsnapshot to store dump dsm handle. Each cursor
      declaration, gpdb dispatch to QE twice. The first dispatch, we force writer
      gang dumping snapshot. The Second dispatch, we create a new reader gang to
      execute cursor fetch and do not wait for reader gang finishes. Writer gang does
      not know when reader gang sync the snapshot done, but must be in a short
      period of time after the first dispatch done. The loop buffer is big enough,
      so we can repeatedly using this space to store snapshot dump.
      6e98844f
    • L
      docs - provide some config info for PAM authentication (#9831) · ec576cf8
      Lisa Owen 提交于
      * docs - provide some config info for PAM authentication
      
      * misc edit per david
      
      * misc edits to genericize
      ec576cf8
    • L
      docs - use correct name for a wal guc (#9851) · 5ec4591c
      Lisa Owen 提交于
      5ec4591c
    • M
      docs - remove persistent table information. (#9850) · a4c2e0ef
      Mel Kiyama 提交于
      a4c2e0ef
    • K
      CI: Don't compile gpdb with a login shell · 52ef538b
      Kalen Krempely 提交于
      On login shells SLES replaces PATH with a fixed known PATH. This was
      causing compilation to fail by removing gcc from the PATH. Previously,
      gcc was being set in /root/.bashrc, but that was removed in favor of
      setting it with docker ENV.
      
      This removes invoking compile_gpdb.bash with a login shell to retain the
      PATH containing gcc on SLES.
      52ef538b
  6. 01 4月, 2020 1 次提交
    • H
      Fix the hang issue in PR(#9726) (#9853) · 82448545
      Hao Wu 提交于
      This PR fixed the hang issue in PR(https://github.com/greenplum-db/gpdb/pull/9726).
      
      The Postgres planner could optimize SelectLockingClause to acquire
      RowShareLock instead of ExclusiveLock, but the orca doesn't optimize
      it. So the following tests may hang with orca:
      ```
      1: begin;
      1: select * from t_lockmods where c<3 for share;
      2: select * from t_lockmods for share;
      2: select * from t_lockmods for update skip locked;
      2: select * from t_lockmods where c>=3 for update nowait;
      2: select * from t_lockmods for update nowait;
      ```
      Reviewed-by: NHubert Zhang <hzhang@pivotal.io>
      82448545
  7. 31 3月, 2020 7 次提交
  8. 30 3月, 2020 1 次提交
    • H
      Remove incorrect function prototypes and unnecessary headers. · 8d66acd8
      Heikki Linnakangas 提交于
      As @hidva pointed out, the prototype for pg_plan_query() in gpdbdefs.h
      was incorrect. On closer inspection, the preprocess_query_optimizer()
      prototype at least was also incorrect. But none of these prototypes in
      gpdbdefs.h are actually needed. Some of them are not used in ORCA at all,
      and others in the headers that are #included. Remove them all.
      
      Also remove a few of the #includes that are not needed. Many more of them
      could probably be removed, I didn't systematically go through all of them,
      I just removed a few that seemed unlikely to be needed.
      8d66acd8
  9. 28 3月, 2020 2 次提交
  10. 27 3月, 2020 3 次提交
    • S
      Bump ORCA version to v3.97.0 · 33fea420
      Sambitesh Dash 提交于
      33fea420
    • A
      Only normalize histogram if well defined · 922dd7c5
      Ashuka Xue 提交于
      When calculating the statistics of a filter node, the histograms of
      newly projected columns are set to empty. Such histograms are not "well
      defined" and thus should not be used to derive cardinality. Instead, we
      use the default cardinality in such cases.
      
      However, there was a bug which calculated the cardinality from non "well
      defined" histograms in the presence of a disjunction on newly projected
      columns. This would result in gross underestimation of expected rows of
      the filter.
      
      This commit fixes this issue.
      Co-authored-by: NAshuka Xue <axue@pivotal.io>
      Co-authored-by: NShreedhar Hardikar <shardikar@pivotal.io>
      922dd7c5
    • S
      Create multi-phase DQAs only if all aggs are splittable · 7fce634e
      Sambitesh Dash 提交于
      Consider the case below:
      
      create table foo (citext a, citext b); explain select min(a), count(distinct a)
      from foo;
      
      Today in GPDB, no combine function exists for a `min` on citext. So
      `ExecInitAgg` will fail for top level aggregate. Aggs with no combine function
      are call non-splittable.
      
      So we should create multi-phase DQAs only if all participating aggs are
      splittable.
      7fce634e
  11. 26 3月, 2020 4 次提交