1. 27 9月, 2019 1 次提交
  2. 26 9月, 2019 6 次提交
    • G
      Fix GRANT/REVOKE ALL statement PANIC when the schema contains partitioned relations · 510a4f01
      Georgios Kokolatos 提交于
      The cause of the PANIC was an incorrectly populated list containing the
      namespace information for the affected the relation. A GrantStmt contains the
      necessary objects in a list named objects. This gets initially populated during
      parsing (via the privilege_target rule) and processed during parse analysis based
      on the target type and object type to RangeVar nodes, FuncWithArgs nodes or
      plain names.
      
      In Greenplum, the catalog information about the partition hierarchies is not
      propagated to all segments. This information needs to be processed in the
      dispatcher and to be added backed in the parsed statement for the segments to
      consume.
      
      In this commit, the partition hierarchy information is expanded only for the
      target and object type required. The parsed statement gets updated
      uncoditionally of partitioned references before dispatching for required types.
      
      The privileges tests have been updated to get check for privileges in the
      segments also.
      
      Problem identified and initial patch by Fenggang <ginobiliwang@gmail.com>,
      reviewed and refactored by me.
      
      (cherry picked from commit 7ba2af39)
      510a4f01
    • A
      Fix crash in COPY FROM for non-distributed/non-replicated table · 3c5f4c15
      Ashwin Agrawal 提交于
      Current code for COPY FROM picks mode as COPY_DISPATCH for
      non-distributed/non-replicated table as well. This causes crash. It
      should be using COPY_DIRECT, which is normal/direct mode to be used
      for such tables.
      
      The crash was exposed by following SQL commands:
      
          CREATE TABLE public.heap01 (a int, b int) distributed by (a);
          INSERT INTO public.heap01 VALUES (generate_series(0,99), generate_series(0,98));
          ANALYZE public.heap01;
      
          COPY (select * from pg_statistic where starelid = 'public.heap01'::regclass) TO '/tmp/heap01.stat';
          DELETE FROM pg_statistic where starelid = 'public.heap01'::regclass;
          COPY pg_statistic from '/tmp/heap01.stat';
      
      Important note: Yes, it's known and strongly recommended to not touch
      the `pg_statistics` or any other catalog table this way. But it's no
      good to panic either. The copy to `pg_statictics` is going to ERROR
      out "correctly" and not crash after this change with `cannot accept a
      value of type anyarray`, as there just isn't any way at the SQL level
      to insert data into pg_statistic's anyarray columns. Refer:
      https://www.postgresql.org/message-id/12138.1277130186%40sss.pgh.pa.us
      
      (cherry picked from commit 6793882b)
      3c5f4c15
    • D
      Docs: fix condition in pivotal .ditaval · 92ac46fc
      David Yozie 提交于
      92ac46fc
    • D
    • M
      docs - move install guide to gpdb repo (#8666) · 3373508e
      Mel Kiyama 提交于
      * docs - move install guide to gpdb repo
      
      --move Install Guide source files back to gpdb repo.
      --update config.yml and gpdb-landing-subnav.erb files for OSS doc builds.
      --removed refs directory - unused utility reference pages.
      --Also added more info to creating a gpadmin user.
      
      These files have conditionalized text (pivotal and oss-only).
      
      ./supported-platforms.xml
      ./install_gpdb.xml
      ./apx_mgmt_utils.xml
      ./install_guide.ditamap
      ./preinstall_concepts.xml
      ./migrate.xml
      ./install_modules.xml
      ./prep_os.xml
      ./upgrading.xml
      
      * docs - updated supported platforms with PXF information.
      
      * docs - install guide review comment update
      
      -- renamed one file from supported-platforms.xml to platform-requirements.xml
      
      * docs - reworded requirement/warning based on review comments.
      3373508e
    • S
      docs: add active directory kerberos steps for pxf (#7055) · 693b28e1
      StanleySung 提交于
      * add ad steps in pxf krb doc
      
      * From Lisa Owen
      
      * distributing keytab using gpscp and gpssh
      
      * Update gpdb-doc/markdown/pxf/pxf_kerbhdfs.html.md.erb
      Co-Authored-By: NAlexander Denissov <denalex@users.noreply.github.com>
      
      * Update gpdb-doc/markdown/pxf/pxf_kerbhdfs.html.md.erb
      Co-Authored-By: NAlexander Denissov <denalex@users.noreply.github.com>
      
      * misc formatting edits
      
      * a few more formatting edits
      693b28e1
  3. 25 9月, 2019 3 次提交
  4. 24 9月, 2019 10 次提交
    • A
      Set up PR pipeline for pg upgrade 6X_STABLE · 346af859
      Adam Berlin 提交于
      346af859
    • F
      Fix issue for "grant all on all tables in schema xxx to yyy;" · 2154dfae
      Fenggang 提交于
      It has been discovered in GPDB v.6 and above that a 'GRAND ALL ON ALL TABLES IN
      SCHEMA XXX TO YYY;' statement will lead to PANIC.
      
      From the resulted coredumps, a now obsolete code in QD that tried to encode
      objects in a partition reference into RangeVars was identified as the culprit.
      The list that the resulting vars were ancored, was expecting and treating only
      StrVars. The original code was added following the premise that catalog
      informations were not available in Segments. Also it tried to optimise caching,
      yet the code was not fully writen.
      
      Instead, the offending block is removed which solves the issue and allows for
      greater alignment with upstream.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      (cherry picked from commit ba6148c6)
      2154dfae
    • N
      Add a regression test for parallel plan dispatching · c4618266
      Ning Yu 提交于
      In commit "Check parallel plans correctly" we introduced a regression
      which was only triggered by the out-tree diskquota tests, now we add a
      simplified version of the tests to ICW to prevent future regressions.
      
      The issue was fixed by "Replace planIsParallel by checking
      Plan->dispatch flag".
      c4618266
    • H
      Replace planIsParallel by checking Plan->dispatch flag. · d750cac7
      Heikki Linnakangas 提交于
      Commit 7d74aa55 introduced a new function, planIsParallel() to check
      whether the main plan tree needs the interconnect, by checking whether
      it contains any Motion nodes. However, we already determine that, in
      cdbparallelize(), by setting the Plan->dispatch flag. We were just not
      checking it when deciding whether the interconnect needs to be set up.
      Let's just check the 'dispatch' flag, like we did earlier in the
      function, instead of introducing another way of determining whether
      dispatching is needed.
      
      I'm about to get rid of the Plan->nMotionNodes field soon, which is why
      I don't want any new code to rely on it.
      
      (cherry picked from commit c1851b62)
      d750cac7
    • P
      Ship subprocess32 and replace subprocess with it in python code (#8658) · 7e44dbf1
      Paul Guo 提交于
      * Ship modified python module subprocess32 again
      
      subprocess32 is preferred over subprocess according to python documentation.
      In addition we long ago modified the code to use vfork() against fork() to
      avoid some "Cannot allocate memory" kind of error (false alarm though - memory
      is actually sufficient) on gpdb product environment that is usually with memory
      overcommit disabled.  And we compiled and shipped it also but later it was just
      compiled but not shipped somehow due to makefile change (maybe a regression).
      Let's ship it again.
      
      * Replace subprocess with our own subprocess32 in python code.
      
      Cherry-picked 9c4a885b and
                    da724e8d and
                    a8090c13 and
                    4354f28c
      7e44dbf1
    • T
      Update the madlib build artifacts path · bb7c4383
      Tingfang Bao 提交于
      Authored-by: NTingfang Bao <bbao@pivotal.io>
      bb7c4383
    • T
      15dbb685
    • T
      Update the gpdb internal build artifacts path (#8678) · 1b816058
      Tingfang Bao 提交于
      In order to maintain the gpdb build process better.
        gp-releng re-organize the build artifacts storage.
      
        Only the artifacts path changed, the content is still
        the same as before.
      Authored-by: NTingfang Bao <bbao@pivotal.io>
      1b816058
    • L
      9e93ba8b
    • J
      Fix CTAS with gp_use_legacy_hashops GUC · b3fb9c3f
      Jimmy Yih 提交于
      When gp_use_legacy_hashops GUC was set, CTAS would not assign the
      legacy hash class operator to the new table. This is because CTAS goes
      through a different code path and uses the first operator class of the
      SELECT's result when no distribution key is provided.
      
      Backported from GPDB master 9040f296. There was one conflict:
      the cdbhash_int4_ops operator class oid is different between 6X and
      master (10196 in master vs. 10166 in 6X).
      b3fb9c3f
  5. 23 9月, 2019 3 次提交
  6. 21 9月, 2019 2 次提交
  7. 20 9月, 2019 7 次提交
    • A
      Set correct github url for pg_upgrade ci. · efc1cd63
      Adam Berlin 提交于
      efc1cd63
    • A
      Add continuous integration pipeline for pg_upgrade. · 135d2596
      Adam Berlin 提交于
      - make modifications to the test scripts to prepare for use on
        Ubuntu. Previously they had only been used on Macosx.
      
      - auto-formatted C and bash files in pg_upgrade tests.
      
      - fixed bug in test script where we had been running the upgrade in
        dispatcher mode when attempting to upgrade the segment primaries.
      135d2596
    • G
      Silence -Wunknown-pragmas warnings (#8619) · 81f54fbb
      gkokolatos 提交于
      Building stream.c has exposed various
      > ignoring #pragma omp parallel [-Wunknown-pragmas]
      when not linked with openmp.
      
      Be explicit and ask openmp for parallelization only when the binary has been
      linked with the library.
      81f54fbb
    • G
      Silece stringop-overflow warning and protect against invalid read (#8620) · dab98884
      gkokolatos 提交于
      strncat unfortunately takes a misleading size argument which means
      at most size from src. It is a bit of an antipattern in the string
      family of functions and for that compilers will emit a warning if
      it happens that the size argument matches the size of src, since that
      is not what usually users of strncat want to do.
      
      The usage of the function in the code was correct. However instead
      of silencing the compiler, strncat was replaced with a front end
      dynamic buffer and family of functions that postgres is providing.
      
      Also protect against an invalid read in case that the size of the
      result is zero.
      dab98884
    • S
      Fix auto_explain_optimizer expected output file. · 1f40afc3
      Sambitesh Dash 提交于
      1f40afc3
    • S
      Bump ORCA v3.72.0 and reduce Error logging for ORCA · 51229867
      Sambitesh Dash 提交于
      - The corresponding ORCA PR is : https://github.com/greenplum-db/gporca/pull/533
      
      - Change GUC value OPTIMIZER_UNEXPECTED_FAIL so that we log only unexpected failures.
      Co-authored-by: NAbhijit Subramanya <asubramanya@pivotal.io>
      Co-authored-by: NSambitesh Dash <sdash@pivotal.io>
      51229867
    • S
      Fix miscellaneous warnings when building ORCA translator code · b12f6e64
      Shreedhar Hardikar 提交于
      - Fix "unelaborated friend declaration" warnings
      - Fix "missing prototype" warnings
      - Fix "generalized initializer lists are a C++ extension" warning
      
      CTranslatorQueryToDXL.h:63:10: warning: unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'gpdxl::CTranslatorScalarToDXL' [-Wc++11-extensions]
                      friend CTranslatorScalarToDXL;
                             ^
                             class
      
      funcs.cpp:43:1: warning: no previous prototype for function 'DisableXform' [-Wmissing-prototypes]
      DisableXform(PG_FUNCTION_ARGS)
      ^
      funcs.cpp:76:1: warning: no previous prototype for function 'EnableXform' [-Wmissing-prototypes]
      EnableXform(PG_FUNCTION_ARGS)
      ^
      funcs.cpp:109:1: warning: no previous prototype for function 'LibraryVersion' [-Wmissing-prototypes]
      LibraryVersion()
      ^
      funcs.cpp:123:1: warning: no previous prototype for function 'OptVersion' [-Wmissing-prototypes]
      OptVersion()
      ^
      4 warnings generated.
      
      CTranslatorDXLToScalar.cpp:730:9: warning: generalized initializer lists are a C++11 extension [-Wc++11-extensions]
              return { .oid_type = inner_type_oid, .type_modifier = type_modifier};
      b12f6e64
  8. 19 9月, 2019 8 次提交
    • N
      icw: move fault injectors into separate groups · b66c09ca
      Ning Yu 提交于
      These tests use fault injection for testing, each of them must be put in
      a separate testing group otherwise they will be flaky.
      
      (cherry picked from commit 558cc68f)
      b66c09ca
    • N
      icw: check for flaky fault injectors · a4fc070f
      Ning Yu 提交于
      Some tests use fault injection for testing, they could be flaky if they
      are put into parallel testing groups as the injected faults can be
      triggered by the tests in the same testing groups.  To make the testing
      results deterministic each of these tests must be put in a separate
      group.
      
      Such kind of flaky tests are very confusing as a test fails randomly due
      to fault injected in other tests, so it can be hard to debug.
      
      So we add a checking at beginning of ICW and isolation2 tests, it raises
      and error when fault injectors are put in parallel testing groups.
      
      (cherry picked from commit d9c0d3f5)
      a4fc070f
    • R
      Fix the panic when rollup() meets subplan. · 7f0583c1
      Richard Guo 提交于
      For GPDB, to use the general plan tree walker/mutator, structure
      plan_tree_base_prefix needs to be prefixed with in the context structure
      and initialized appropriately. It is needed by function plan_tree_walker
      to recur into the subplan in case of visiting a SubPlan node.
      
      However, context structure SubqueryScanWalkerContext fails to do that.
      So when we are trying to recurse through a plan tree to find a subquery
      scan node, if there is a subplan there, we will crash.
      
      This patch fixes that. Also it fixes github issue #8342 as well as the
      panic in github issue #7279.
      Reviewed-by: NMelanie Plageman <mplageman@pivotal.io>
      7f0583c1
    • S
      5d40160f
    • B
      Update pg_hba.conf with mirror information with gpmovemirrors · 51e19721
      Bhuvnesh Chaudhary 提交于
      When a mirror is moved from one host to another, the pg_hba.conf of the
      corresponding primary should be updated with the entry for the new
      mirror host to allow connections from mirror to primary segment
      database. This is required by pg_rewind during gprecoverseg operations.
      
      Also, an additional minor change is the condition for removing the old
      directories, i think it was a typo error before, as the condition should have
      checked for numOfWorkers>0 instead of >1, because if there is one host
      only, we will not be removing the old directories otherwise.
      51e19721
    • M
      docs - add information about timestamp format YYYYMMDDHH24MISS (#8640) · 5ebacdf1
      Mel Kiyama 提交于
      * docs - add information about timestamp format YYYYMMDDHH24MISS
      
      GPDB does not automatically convert string to timestamp
      
      Will be backported to 6X_STABLE
      
      * docs - fixed formatting in XML source
      
      removed unneeded section element.
      5ebacdf1
    • M
      docs - add gpfdist support for writing gzip compressed files. (#8626) · b8573f7e
      Mel Kiyama 提交于
      * docs - add gpfdist support for writing gzip compressed files.
      
      Also added links to the gpfdist utility in other topics
      
      Will be backported to 5X_STABLE
      
      * docs - Update based on review comments.
      --removed path requirement for compression.
      --clarified note compression is not supported when gpfidist runs on Windows.
      
      * Typo fix:  gpfidist -> gpfdist
      
      * Typo fix:  gpfidist -> gpfdist
      b8573f7e
    • D
      Fix gpexpand entries in hba.conf (#8617) (#8650) · 1a92db54
      David Kimura 提交于
      Append into pg_hba configs of expanded segments the addresses of the
      primary and mirror segments. The hba config is copied from segment 0.
      We must update it with the new primary/mirror pair information otherwise
      connections between the systems will fail. This connection is necessary
      during pg_rewind.
      Co-authored-by: NBhuvnesh Chaudhary <bhuvnesh2703@gmail.com>
      Co-authored-by: NJesse Zhang <sbjesse@gmail.com>
      1a92db54