1. 12 3月, 2019 11 次提交
    • T
      Fix altconname related tests · 62449ea4
      Taylor Vesely 提交于
      This commit is part of Add Partitioned Indexes #7047.
      
      Constraint names must now match their index. Fix ICW tests where this
      assumption no longer holds.
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      62449ea4
    • T
      Prevent check constraint drop on leaf partitions · ac12504d
      Taylor Vesely 提交于
      This commit is part of Add Partitioned Indexes #7047.
      
      Don't allow check constraints to be dropped on partition leaves. Only
      allow them to be dropped from the root.
      
      This restriction had been relaxed on PRIMARY KEY and UNIQUE constraints
      after adding INTERNAL_AUTO dependencies to constraints. However, we need
      to maintain the restiction on check constrants because they are
      currently not being protected by pg_depend.
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      ac12504d
    • T
      pg_upgrade: Drop all indexes from partition tables · 26417f43
      Taylor Vesely 提交于
      This commit is part of Add Partitioned Indexes #7047.
      
      Until indexes can be upgraded drop all indexes. Drop from the root
      partition instead of on intermediate/leaf partitions, since they now
      cascade due to their INTERNAL_AUTO dependencies.
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      26417f43
    • T
      Update exchange/split partition for partitioned indexes · f7971a6a
      Taylor Vesely 提交于
      This commit is part of Add Partitioned Indexes #7047.
      
      During exchange and split partition update the pg_depend relationships and
      exchange constraint names.
      
      AttachPartitionEnsureIndexes was cherry-picked from:
      commit 8b08f7d4
      Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
      Date:   Fri Jan 19 11:49:22 2018 -0300
      
          Local partitioned indexes
      
          When CREATE INDEX is run on a partitioned table, create catalog entries
          for an index on the partitioned table (which is just a placeholder since
          the table proper has no data of its own), and recurse to create actual
          indexes on the existing partitions; create them in future partitions
          also.
      
          As a convenience gadget, if the new index definition matches some
          existing index in partitions, these are picked up and used instead of
          creating new ones.  Whichever way these indexes come about, they become
          attached to the index on the parent table and are dropped alongside it,
          and cannot be dropped on isolation unless they are detached first.
      
          To support pg_dump'ing these indexes, add commands
              CREATE INDEX ON ONLY <table>
          (which creates the index on the parent partitioned table, without
          recursing) and
              ALTER INDEX ATTACH PARTITION
          (which is used after the indexes have been created individually on each
          partition, to attach them to the parent index).  These reconstruct prior
          database state exactly.
      
          Reviewed-by: (in alphabetical order) Peter Eisentraut, Robert Haas, Amit
                  Langote, Jesper Pedersen, Simon Riggs, David Rowley
          Discussion: https://postgr.es/m/20171113170646.gzweigyrgg6pwsg4@alvherre.pgsqlCo-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      f7971a6a
    • T
      Add Partitioned Indexes · 9d40d472
      Taylor Vesely 提交于
      This commit adds partitioned indexes from upstream Postgres. This commit is
      mostly cherry-picked from Postgres 11 and bug fixes from Postgres 12.
      
      Differences from upstream:
       - Postgres has two additional relkind's - RELKIND_PARTITIONED_TABLE and
         RELKIND_PARTITIONED_INDEX, which have no on disk storage. Greenplum does not
         have these additional relkinds. Thus, partitioned indexes have physical
         storage.
       - CREATE INDEX ON ONLY <table> DDL has not yet been implemented
       - ALTER INDEX ATTACH PARTITION DDL has not yet been implemented
      
      Constraint changes:
       - Constraints and their backing index have the same names. Thus, partitions of
         a table no longer share the same constraint name, and are instead related to
         their parent via INTERNAL_AUTO dependencies.
      
      Index changes:
       - Child partition indexes can no longer be directly dropped, and must be
         dropped from their root. This includes mid-level and leaf indexes.
       - Adding indexes to mid-level partitions cascade to their children.
      
      These changes are mostly cherry-picked from:
      commit 8b08f7d4
      Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
      Date:   Fri Jan 19 11:49:22 2018 -0300
      
          Local partitioned indexes
      
          When CREATE INDEX is run on a partitioned table, create catalog entries
          for an index on the partitioned table (which is just a placeholder since
          the table proper has no data of its own), and recurse to create actual
          indexes on the existing partitions; create them in future partitions
          also.
      
          As a convenience gadget, if the new index definition matches some
          existing index in partitions, these are picked up and used instead of
          creating new ones.  Whichever way these indexes come about, they become
          attached to the index on the parent table and are dropped alongside it,
          and cannot be dropped on isolation unless they are detached first.
      
          To support pg_dump'ing these indexes, add commands
              CREATE INDEX ON ONLY <table>
          (which creates the index on the parent partitioned table, without
          recursing) and
              ALTER INDEX ATTACH PARTITION
          (which is used after the indexes have been created individually on each
          partition, to attach them to the parent index).  These reconstruct prior
          database state exactly.
      
          Reviewed-by: (in alphabetical order) Peter Eisentraut, Robert Haas, Amit
                  Langote, Jesper Pedersen, Simon Riggs, David Rowley
          Discussion: https://postgr.es/m/20171113170646.gzweigyrgg6pwsg4@alvherre.pgsql
      
      Changes were also cherry-picked from the following Postgres commits:
        eb7ed3f3 - Allow UNIQUE indexes on partitioned tables
        ae366aa5 - Detach constraints when partitions are detached
        19184fcc - Simplify coding to detach constraints when detaching partition
        c7d43c4d - Correct attach/detach logic for FKs in partitions
        17f206fb - Set pg_class.relhassubclass for partitioned indexes
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      9d40d472
    • D
      Changing version in path from /600 to /6-0 for consistency with other docs and... · 11529a7e
      David Yozie 提交于
      Changing version in path from /600 to /6-0 for consistency with other docs and to recognize that only the minor version digit is significant for the doc build (#7141)
      
      11529a7e
    • H
      Bump ORCA version to 3.29.0, updating ICG expected files · 258a4927
      Hans Zeller 提交于
      * Bump ORCA version to 3.29.0
      
      * ORCA: Updating subquery plans in ICG expected files
      
      This change is needed for ORCA PR https://github.com/greenplum-db/gporca/pull/449.
      Some subquery plans changed in minor ways in the ICG test.
      Co-authored-by: NChris Hajas <chajas@pivotal.io>
      258a4927
    • D
      Restoring gpmovemirrors (#7131) · fbbcd435
      David Yozie 提交于
      fbbcd435
    • J
      ALTER TABLE SET DISTRIBUTED RANDOMLY should check for primary key or unique index · c55fe2d6
      Jimmy Yih 提交于
      Currently, a randomly distributed table cannot be created with a
      primary key or unique index. We should put this restriction for ALTER
      TABLE SET DISTRIBUTED RANDOMLY as well. This was caught by gpcheckcat
      distribution_policy check.
      Co-authored-by: NAlexandra Wang <lewang@pivotal.io>
      c55fe2d6
    • J
      Make relationHasUniqueIndex() an extern function · ea7096f1
      Jimmy Yih 提交于
      The Greenplum-specific relationHasUniqueIndex() function is similar to
      the already existing relationHasPrimaryKey() function. We should make
      it available for extern use, and put them closer since they could be
      used together sometimes.
      Co-authored-by: NAlexandra Wang <lewang@pivotal.io>
      ea7096f1
    • S
      Remove `gpaddon_src` references in ci/build · 04c93f35
      Sambitesh Dash 提交于
      The gp-addon repo was used to provide the quick-lz artifacts but this
      has been moved in to the Docker images used for building GPDB6.
      Co-authored-by: NSambitesh Dash <sdash@pivotal.io>
      Co-authored-by: NBradford D. Boyle <bboyle@pivotal.io>
      04c93f35
  2. 11 3月, 2019 10 次提交
    • D
      Fix typos in workfile manager documentation · c968df22
      Daniel Gustafsson 提交于
      Not user-facing documentation changed, only code comments. Spotted
      while reading code.
      c968df22
    • D
      Avoid setting unused variables · f0fc32e6
      Daniel Gustafsson 提交于
      The range partition handling in get_part_rule() seemed to have some
      parts copypasted from the list handling, and subsequently ended up
      looking at and setting variables never to be read. Remove the unused
      code and also ensure to exit early in case we weren't called with
      the correct data.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      f0fc32e6
    • D
      Move partition type definition into errorpath · a4f623ae
      Daniel Gustafsson 提交于
      Saving the partitioning type into a string was done with an elaborate
      switch() only for the string to be consumed in a single errorpath.
      Rather than spending cycles and memory for a rare error, inline the
      partition type string handling into the errorpath.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      a4f623ae
    • D
      Turn partition add check into an assertion · 23670b93
      Daniel Gustafsson 提交于
      get_part_rule() must only return NULL for this addition to make any
      sense to continue with, but we silently ignored when it didn't with
      a rather odd codepath. Since get_part_rule() is defined to always
      error out on the conditions we don't want, add an assertion for this
      and reindent the code to rely on it doing the right thing.
      
      Also discard unused returnvalues.
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      23670b93
    • D
      Gracefully error out on incorrect partition type add · 460789a0
      Daniel Gustafsson 提交于
      When altering a partitioned table and adding an incorrectly specified
      partition, an assertion was hit rather than gracefully erroring out.
      Make sure that the requested partition matches the underlying table
      definition before continuing down into the altering code. This also
      adds a testcase for this.
      
      Reported-by: Kalen Krempely in #6967
      Reviewed-by: NPaul Guo <pguo@pivotal.io>
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      460789a0
    • D
      Rename recursive CTE guc to remove _prototype · f6a1a60e
      Daniel Gustafsson 提交于
      The GUC which enables recursive CTEs is in the currently released
      version called gp_recursive_cte_prototype, but in order to reflect
      the current state of the code it's now renamed to gp_recursive_cte.
      By default the GUC is still off, but that might change before we
      ship the next release.
      
      The previous GUC name is still supported, but marked as deprecated,
      in order to make upgrades easier.
      Reviewed-by: NIvan Novick <inovick@pivotal.io>
      Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
      f6a1a60e
    • N
      Retire the reshuffle method for table data expansion (#7091) · 1c262c6e
      Ning Yu 提交于
      This method was introduced to improve the data redistribution
      performance during gpexpand phase2, however per benchmark results the
      effect does not reach our expectation.  For example when expanding a
      table from 7 segments to 8 segments the reshuffle method is only 30%
      faster than the traditional CTAS method, when expanding from 4 to 8
      segments reshuffle is even 10% slower than CTAS.  When there are indexes
      on the table the reshuffle performance can be worse, and extra VACUUM is
      needed to actually free the disk space.  According to our experiments
      the bottleneck of reshuffle method is on the tuple deletion operation,
      it is much slower than the insertion operation used by CTAS.
      
      The reshuffle method does have some benefits, it requires less extra
      disk space, it also requires less network bandwidth (similar to CTAS
      method with the new JCH reduce method, but less than CTAS + MOD).  And
      it can be faster in some cases, however as we can not automatically
      determine when it is faster it is not easy to get benefit from it in
      practice.
      
      On the other side the reshuffle method is less tested, it is possible to
      have bugs in corner cases, so it is not production ready yet.
      
      In such a case we decided to retire it entirely for now, we might add it
      back in the future if we can get rid of the slow deletion or find out
      reliable ways to automatically choose between reshuffle and ctas
      methods.
      
      Discussion: https://groups.google.com/a/greenplum.org/d/msg/gpdb-dev/8xknWag-SkI/5OsIhZWdDgAJReviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
      1c262c6e
    • Z
      Only get necessary relids for partition table in InitPlan · a71447db
      Zhenghua Lyu 提交于
      Previously, during initializing ResultRelations in InitPlan on
      QD, it always builds the relids as all the relation oids in a
      partition table (including root and all its inheritors).
      Sometimes we does not need all the relids.
      
      A typical case is for ao partition table. When we directly
      insert into a specific child partition, the plan's ResultRelation
      only contains the child partition. And if we still make relids
      as root and all its inheritors, during `assignPerRelSegno`,
      it might lock each aoseg file on AccessShare mode on QEs. It
      causes confusion that the insert statement is only for a child
      partition but holding other partition's lock.
      
      This commit changes the relids building logic as:
        - if the ResultRelation contains the root partition, then
          relids is root and all its inheritors
        - otherwise, relids is a map of ResultRelations to get the
          element's relation oid
      a71447db
    • D
      Align resource group ereports with style guide · 045162d5
      Daniel Gustafsson 提交于
      Make sure all ereports() starts with a lowercase letter, and move
      longer explanations to errdetail/errhints. Also fix expected error
      output to match.
      Reviewed-by: NAdam Berlin <aberlin@pivotal.io>
      Reviewed-by: NJacob Champion <pchampion@pivotal.io>
      045162d5
    • D
      Fix typo in gpconfig variable name · 338e40ba
      Daniel Gustafsson 提交于
      While harmless, knowing it's there is enough and I can't unsee it.
      Also reduce the scope of the variable as it has no outside users.
      Co-authored-by: NJacob Champion <pchampion@pivotal.io>
      Reviewed-by: NJacob Champion <pchampion@pivotal.io>
      338e40ba
  3. 10 3月, 2019 1 次提交
  4. 09 3月, 2019 9 次提交
    • J
      Revert recent changes to gpinitstandby and gprecoverseg · 659f0ee5
      Jacob Champion 提交于
      One of these changes appears to have possibly introduced a serious
      performance regression in the master pipeline. To avoid destabilizing
      work over the weekend, I'm reverting for now and we can investigate more
      fully next week.
      
      This reverts the following commits:
      "gprecoverseg: Show progress of pg_basebackup on each segment"
          1b38c6e8
      "Add gprecoverseg -s to show progress sequentially"
          9e89b5ad
      "gpinitstandby: guide the user on single-host systems"
          c9c3c351
      "gpinitstandby: rename -F to -S and document it"
          ba3eb5b4
      659f0ee5
    • L
      docs - add pxf config info for s3 server-side encryption (#7070) · f35dcd60
      Lisa Owen 提交于
      * docs - add pxf config info for s3 server-side encryption
      
      * add xref to aws docs for setting bucket encryption
      
      * create bucket and key in same AZ, section title formatting
      
      * remove number from bucket name variable
      
      * s3 config - xref to hadoop s3a prop section
      
      * copy edits requested by david
      
      * add the bucket variable numbers back in
      f35dcd60
    • M
      docs - CTE available with INSERT, UPDATE, DELETE (#7025) · 45d72f77
      Mel Kiyama 提交于
      * docs - CTE available with INSERT, UPDATE, DELETE
      
      -updated GUC
      -updated Admin Guide topic WITH Queries (Common Table Expressions)
      
      updates to SELECT, INSERT, UPDATE DELETE will be part of postgres 9.2 merge.
      
      * docs - CTE updates from review comments
      
      * docs - CTE more updates from review comments
      
      * docs - CTE - updates from review comments
      
      * Experimental -> Beta wording
      45d72f77
    • D
      Docs postgresql 9.3 merge (#7084) · 63ac5d2a
      David Yozie 提交于
      * vacuumdb - add -t option support for multiple tables
      
      * reindexdb - add -t option support for multiple tables; misc edits
      
      * psql - misc additions, edits, and reformats
      
      * pg_dump - misc edits, additions, formatting
      
      * add * syntax for descendant tables
      
      * pg_dumpall - add -d, --dbname option
      
      * PREPARE - add note about search_path
      
      * TRUNCATE - add * option
      
      * SELECT - add LATERAL, NO KEY UPDATE, KEY SHARE, and related edits to locking clause
      
      * ALTER ROLE. Re-order syntax and descriptions.
      
      * ALTER RULE. Add new command and fix some conref issues
      
      * COPY. Add FREEZE option and edits.
      
      * CREATE INDEX. Minor synopsis update.
      
      * CREATE SCHEMA. Add IF NOT EXISTS forms of command
      
      * CREATE TABLE. Syntax changes. Add SET CONSTRAINTS command.
      
      * bgworker. Add bgworker topic to reference guide
      
      * CREATE TABLE AS. Add WITH/WITHOUT OIDS
      
      * Changes from review
      
      * remove some parens, add trigger note
      
      * remove extra whitespace in CREATE TABLE
      
      * CREATE TABLE AS - correct DISTRIBUTED BY syntax
      
      * Review comments on CREATE TABLE.
      
      * pg_dump - add parallelization note
      
      * CREATE TABLE - fix whitespace again?
      
      * Remove docs for LATERAL
      
      * Add LATERAL to unsupported feature list
      63ac5d2a
    • J
      gpinitstandby: rename -F to -S and document it · ba3eb5b4
      Jacob Champion 提交于
      After the WALrep changes, the previous -F (filespace) option was
      co-opted to be the new standby data directory option. This isn't a
      particularly obvious association.
      
      Change the option to -S. (-D would have been better, but that's already
      in use as a short alias for --debug.) Also document this option in the
      official gpinitstandby help.
      ba3eb5b4
    • J
      gpinitstandby: guide the user on single-host systems · c9c3c351
      Jacob Champion 提交于
      When a standby is initialized on the same host as the original master,
      remind the user that the data directory and port need to be explicitly
      set.
      c9c3c351
    • K
      Add gprecoverseg -s to show progress sequentially · 9e89b5ad
      Kalen Krempely 提交于
      When -s is present, show pg_basebackup progress sequentially instead
      of inplace. Useful when writing to a file, or if a tty does not support
      escape sequences. Defaults to showing the progress inplace.
      9e89b5ad
    • S
      gprecoverseg: Show progress of pg_basebackup on each segment · 1b38c6e8
      Shoaib Lari 提交于
      The gprecoverseg utility runs pg_basebackup in parallel on all segments that are
      being recovered.  In this commit, we are logging the progress of each
      pg_basebackup on its host and displaying them to the user of gprecoverseg.  The
      progress files are deleted upons successful completion of gprecoverseg.
      
      Unit tests have also been added.
      Authored-by: NShoaib Lari <slari@pivotal.io>
      Co-authored-by: NMark Sliva <msliva@pivotal.io>
      Co-authored-by: NJacob Champion <pchampion@pivotal.io>
      Co-authored-by: NEd Espino <edespino@pivotal.io>
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      1b38c6e8
    • D
      Docs: reword from 'experimental' to 'beta' (#7103) · 79d3bb7f
      David Yozie 提交于
      * reword from 'experimental' to 'beta'
      
      * Experimental -> Beta in markdown source
      
      * typo fix
      
      * Removing SuSE 11 details in Beta notes
      79d3bb7f
  5. 08 3月, 2019 6 次提交
  6. 07 3月, 2019 3 次提交