1. 05 3月, 2019 11 次提交
  2. 04 3月, 2019 2 次提交
    • Z
      ItemPointer of AO tables need to be fixed · 33c5ce70
      Zhang Shujie 提交于
      We generate the fake ItemPointer for AO table's tuple, but it is
      a little different from the HEAP table's ItemPointer, the offset
      of the pointer can be 0 when it is a fake ItemPointer, but we
      treat 0 to be invalid in the previous codes, In order to run
      correctly, we set the 16th bit of offset to be 1 as a flag, then
      it can pass some check, but the value is not the real value, so when
      using the fake ItemPointer, we have to note to process the flag.
      
      The bitmap index build code expects to see the tuple IDs in order. 
      It gets confused when it sees offset number 32768(0x8000) 
      before offset number 1, this commit convert 32768(0x8000) to
      be 0.
      33c5ce70
    • O
      Vagrant: Source greenplum_path.sh in ~/.bashrc (#7080) · 36c56f9b
      Oliver Albertini 提交于
      * this way when you ssh onto the VM, you have e.g. psql available to you
      Authored-by: NOliver Albertini <oalbertini@pivotal.io>
      36c56f9b
  3. 02 3月, 2019 1 次提交
  4. 01 3月, 2019 9 次提交
    • N
      gpexpand: fix a dbname in behave tests · 1ba89f40
      Ning Yu 提交于
      To query the gpexpand schema we must connect to "postgres" database now,
      update a forgot-to-changed dbname in gpexpand behave tests
      1ba89f40
    • N
      gpexpand: retire -D option in tests · f703dfbf
      Ning Yu 提交于
      The -D option was retired in commit
      ec708f34, but we did not update the
      tests accordingly.
      
      Now we retire the -D option from gpexpand tests, too.
      f703dfbf
    • Z
      Add gpexpand status check in some utility · 7f5705cd
      Zhenghua Lyu 提交于
      The following utilities do not work when we are in gpexpand phase 1:
      
      * gppkg
      * gpconfig
      * gpcheckat
      
      Add check for them so that if cluster is expanding in phase1, they will
      print error message and exit.
      7f5705cd
    • N
      behave: reset matcher position for each command · 72f8fe5b
      Ning Yu 提交于
      This position is used by gpstate tests to verify the output, we must
      reset it on each executed command to correctly matching multiple
      commands in one scenario.
      72f8fe5b
    • N
      gpstate: show gpexpand status. · 401dcc9a
      Ning Yu 提交于
      Added a new gpstate argument `-x` to show gpexpand status.  The status
      information is obtained with the gp_expand_get_status() function,
      progress information of the data expansion phase can also be showed.
      
      For `gpstate` or `gpstate -s` a `Cluster Expansion = In Progress`
      summary is also displayed if gpexpand is in progress.
      401dcc9a
    • N
      gpexpand: provide python API to get gpexpand status · 02d8b86b
      Ning Yu 提交于
      `get_gpexpand_status()` is provided in gppylib.commands.gp, it returns
      an object whose attributes indicate the current gpexpand status:
      - phase: a number to specify current phase:
        - 0: expansion is not in progress;
        - 1: phase 1, the cluster setup phase;
        - 2: phase 2, the data redistribution phase;
      - status: a string to specify current phase, not quite meaningful;
      
      The returned object also has a `get_progress()` method which can be used
      to further check the progress information of the data distribution
      phase.
      02d8b86b
    • N
      gpexpand: always store schema tables in 'postgres' db · ec708f34
      Ning Yu 提交于
      gpexpand used to store schema tables in the database specified by the
      user with -D option, this caused some complicated handlings, for example
      gpexpand needed to scan all the databases to ensure schema tables in the
      specified database are correct.
      
      To simplify this we retired the -D option, and always use the 'postgres'
      database to store the schema tables.
      ec708f34
    • L
      docs - misc pxf updates (#7063) · 0cb723a4
      Lisa Owen 提交于
      * docs - misc pxf updates
      
      * scp -> cp
      
      * misc edits requested by david
      
      * remove seg failure troubleshooting section, new PR for that
      0cb723a4
    • L
      docs - add new host/seg resource group usage views (#7061) · 40240513
      Lisa Owen 提交于
      * docs - add new host/seg resource group usage views
      
      * clarifications requested by ning
      40240513
  5. 28 2月, 2019 4 次提交
    • P
      Replace twophase_XLogPageRead() with read_local_xlog_page() for generic xlog... · 1d4dfbb7
      Paul Guo 提交于
      Replace twophase_XLogPageRead() with read_local_xlog_page() for generic xlog page read for two phase code.
      
      logical_read_local_xlog_page() was renamed as read_local_xlog_page() in
      postgres commit 422a55a6 for generic xlog page
      read. We should use that for two phase state xlog reading given that comes from
      upstream and also it seems that twophase_XLogPageRead() is buggy also (e.g.  it
      does not consider cross segment file). We backport
      422a55a6 also because it is used by another
      patch that we will backport also (see below 2).
      
      This patch removes two FIXMEs also:
      
      1. Previously XLogCloseReadRecord() was needed to re-initialize for
         XLogPageRead() (typically after startup ends), but now we of course
         do not need that, so removing the comment below.
      
          * GPDB_93_MERGE_FIXME: GPDB used to do XLogCloseReadRecord() and then read,
          * do we need to perform something similar with new interface.
      
      2.  The FIXME below is deleted when we replace the
          function twophase_XLogPageRead(), but the comment is reasonable
          because it is possible that PREPARE xlog exists in an older segment
          file with previous timeline id even during mirror promotion some
          previous xlogs are copied when creating the new segment file for
          the new timeline id. We backport postgres patch 49e4196 to address this.
      
         // GPDB_93_MERGE_FIXME: Is ThisTimeLineID correct here? Do we need to
         // fetch prepare records for past timelines, after promotion?
      1d4dfbb7
    • S
      Teach xlogreader to follow timeline switches · 26930d11
      Simon Riggs 提交于
      Uses page-based mechanism to ensure we’re using the correct timeline.
      
      Tests are included to exercise the functionality using a cold disk-level copy
      of the master that's started up as a replica with slots intact, but the
      intended use of the functionality is with later features.
      
      Craig Ringer, reviewed by Simon Riggs and Andres Freund
      26930d11
    • S
      Refactor to create generic WAL page read callback · 03baa031
      Simon Riggs 提交于
      Previously we didn’t have a generic WAL page read callback function,
      surprisingly. Logical decoding has logical_read_local_xlog_page(), which was
      actually generic, so move that to xlogfunc.c and rename to
      read_local_xlog_page().
      Maintain logical_read_local_xlog_page() so existing callers still work.
      
      As requested by Michael Paquier, Alvaro Herrera and Andres Freund
      03baa031
    • B
      Move intermediate pipeline resources from S3 to GCS (#7068) · ab78c4d2
      Ben Christel 提交于
      This commit moves all of the intermediate concourse resources (which are
      only used internally in the pipeline) to now use GCP buckets as opposed
      to AWS S3 storage.
      
      The ((pipeline-name)) variable added to gen_pipeline.py is needed for
      supporting the naming conventions that are used for new GCS objects,
      which namespace artifacts by pipeline.
      Co-authored-by: NBen Christel <bchristel@pivotal.io>
      Co-authored-by: NAmil Khanzada <akhanzada@pivotal.io>
      Co-authored-by: NSambitesh Dash <sdash@pivotal.io>
      Co-authored-by: NOliver Albertini <oalbertini@pivotal.io>
      ab78c4d2
  6. 27 2月, 2019 8 次提交
    • J
      refactor NUMSEGMENTS related macro (#7028) · d28b7057
      Jialun 提交于
      - Retire GP_POLICY_ALL_NUMSEGMENTS and GP_POLICY_ENTRY_NUMSEGMENTS,
        unify to getgpsegmentCount
      - retire GP_POLICY_MINIMAL_NUMSEGMENTS & GP_POLICY_RANDOM_NUMSEGMENTS
      - Change NUMSEGMENTS related macro from variable macro to function
        macro
      - Change default return value of getgpsegmentCount to 1, which
        represents a singleton postgresql in utility mode
      - change __GP_POLICY_INVALID_NUMSEGMENTS to GP_POLICY_INVALID_NUMSEGMENTS
      d28b7057
    • N
      resgroup: remove a misplaced return command · 8ceab6e4
      Ning Yu 提交于
      8ceab6e4
    • N
      resgroup: reduce log level for operator memory overuse · ede74cdc
      Ning Yu 提交于
      When operator memory overuse happens we used to produce a warning
      messages, it can be confusing as we actually expect it to happen.
      
      Reduced the log levels for these messages.
      ede74cdc
    • N
      resgroup: allow memory overuse for hashagg spill meta data · f053e6cd
      Ning Yu 提交于
      Each hashagg spill batch file needs about 16KB memory to store the meta
      data, when there are many batch files the overall meta data size might
      exceed the assigned operatory memory.  In resource group we could allow
      this overuse as there are better memory control at transaction level,
      and the resource group shared memory is designed to serve these kinds of
      overuses.
      f053e6cd
    • D
      Docs postgresql 9.2 merge (take 2) (#7048) · f06a09f3
      David Yozie 提交于
      * vacuumdb - add missing equal signs =
      
      * CREATE/ALTER/DROP COLLATION. Adds new references for these commands.
      
      * remove space
      
      * DROP COLLATION. Remove redundant privileges statement.
      
      * SELECT. Add DISTINCT to several clauses, and may edits.
      
      * CREATE TABLE. Adds NO INHERIT, IF NOT EXISTS, column_reference_storage_directive syntax, edits.
      
      * ALTER DOMAIN. Add new forms of command.
      
      * ALTER EXTENSION. Small edit only.
      
      * ALTER FUNCTION. Add LEAKPROOF.
      
      * ALTER_INDEX. Change SET/RESET FILLFACTOR to SET (fillfactor=)
      
      * ALTER OPERATOR FAMILY. Add SP_GiST to descriptions.
      
      * ALTER SEQUENCE. Add IF EXISTS.
      
      * ALTER SERVER. Small edits.
      
      * Add Range Type section & related changes
      
      * ALTER TYPE - add UAGE privilege requirement
      
      * ALTER VIEW - add IF EXISTS keyword; add syntax for view settings
      
      * ANALYZE - add info about foreign tables
      
      * CHECKPOINT - remove WAL paragraph; other edits
      
      * ALTER TABLE. Add IF EXISTS, constraints, edits
      
      * CREATE VIEW - add view option syntax
      
      * CREATE OPERATOR TYPE - minor edits
      
      * CREATE OPERATOR - add USAGE requirement
      
      * createdb - new maintenance-db option; minor edits; simplify synopsis to be consistent with util output & postgresql docs
      
      * createlang - add note about lower-casing the name
      
      * createuser - add default notices, --interactive option, update examples
      
      * DELETE - fix codeph style
      
      * DROP INDEX - add CONCURRENTLY option
      
      * DROP TABLE - small edit to permissions required
      
      * dropdb - add --maintenance-db option
      
      * droplang - add lowercase notice
      
      * dropuser - add --if-exists; edits around prompting.
      
      * clusterdb. Add --maintenance-db connection option.
      
      * COMMENT. Replace table_name argument with relation_name
      
      * CREATE AGGREGATE. Add privileges paragraph.
      
      * CREATE CAST. Add privileges required.
      
      * CREATE DOMAIN. Add required privileges, edit example.
      
      * CREATE FUNCTION. Add LEAKPROOF function attribute.
      
      * CREATE INDEX. add BUFFERING storage parameter.
      
      * CREATE LANGUAGE. minor edit.
      
      * CREATE TABLE AS. Edits. Deprecate GLOBAL/LOCAL. Also update SELECT and CREATE TABLE to enable links.
      
      CREATE TABLE AS. Edits. Deprecate GLOBAL/LOCAL. Also update CREATE TABLE to enable links.
      
      * CREATE ROLE. minor edits.
      
      * GRANT - add USAGE ON DOMAIN, ON TYPE, with related notes
      
      * EXPLAIN. Add BUFFERS option. Fix missing query in example.
      
      * PREPARE. Edits.
      
      * SELECT. add values clause  to with_query, updates select list, ORDER BY, LIMIT, FOR UPDATE/FOR SHARE clauses
      
      * DELETE. updates to with_query for data-modifying commands.
      
      * INSERT - updates to with_query for data-modifying commands.
      
      * UPDATE - updates to with_query for data-modifying commands.
      
      * REVOKE. add DOMAIN and TYPE variants
      
      * SET. minor edit.
      
      * pg_dump. Add --section and related parameters.
      
      * pg_restore - add --section option and related text/edits
      
      * reindexdb - add --maintenancedb connection option
      
      * vacuumdb - add --maintenancedb connection option
      
      * SET TRANSACTION. - snapshot not supported. minor edit.
      
      * postgresql - edits, additions introduced in 9.2; major omissions and re-writes were sourced from the 9.4 docs
      
      * Changes from review
      
      * misc edits
      
      * misc edit
      
      * Remove outputclass tags from sgml conversion
      
      * reformat converted files
      f06a09f3
    • A
      Bump ORCA version to 3.28.0 · ece1ab09
      Abhijit Subramanya 提交于
      ece1ab09
    • A
      Support MCV based cardinality estimation for text columns in ORCA · 22d18889
      Abhijit Subramanya 提交于
      Prior to this patch, the MCVs for text columns was not being passed to ORCA.
      Hence the cardinality estimation for predicates involving text was inaccurate
      and led to sub optimal plans being picked. This patch allows the MCVs to be
      passed in to ORCA so that it can now estimate the cardinality using MCVs equal
      and not equal operators for text columns.
      Co-authored-by: NAbhijit Subramanya <asubramanya@pivotal.io>
      Co-authored-by: NBhuvnesh Chaudhary <bchaudhary@pivotal.io>
      22d18889
    • D
      We improve the check in pg_upgrade for gphdfs in the following ways. · 4809a46c
      David Krieger 提交于
      All of these checks are done only when the old cluster version has
      support for gphdfs.
      
      1). skip checking for gphdfs tables for cluster versions where gphdfs
      support is absent.
      2). fail upon a successful check for gphdfs roles
      
      NOTE: we do not special case the existence of the gphdfs.so library,
      even in absense of gphdfs tables or roles.  In other words, the existing
      library checks force the user to drop all gphdfs-dependent functions
      before upgrade.
      Co-authored-by: NFrancisco Guerrero <aguerrero@pivotal.io>
      4809a46c
  7. 26 2月, 2019 5 次提交
    • H
      Export OPENSSL_CONF only if there is etc/openssl.conf in gpdb. (#7051) · 43581ec3
      Huiliang.liu 提交于
      - For centos and ubuntu, openssl.conf is from system default path
      now. etc/openssl.conf in gpdb directory has been removed. So if we
      should not export OPENSSL_CONF in greenplum_path.sh.
      43581ec3
    • O
      Make Vagrant builds functional (#6764) · f080669d
      Oliver Albertini 提交于
      Vagrant: Make Debian and Centos builds functional
      
      * Refactor bash and ruby code in vagrant setup
      * Give unique names to VMs with Gporca and without
      * add an example `vagrant-local.yml` that syncs `~/gpdb` with `rsync`
      * Remove gp-xerces, use out-of-the-box Xerces instead
      * use Bentobox builds for Debian and Centos
      * Apply host's GPDB git configuration in VM: includes git user.name, user.email, clones from the same origin as user, adds all the user's remotes, and attempts to check out user's current remote/branch
      * gitignore the .vagrant directories
      f080669d
    • D
      pg_upgrade changes to upgrade from GPDB5 to GPDB6 · ecd3400f
      David Krieger 提交于
      Minor changes are made to pg_upgrade to allow GPDB5 to be upgraded
      to GPDB6:
      
      1). pg_ctl arguments need to explicitly contain the dbid, contentid and
      numcontents in order to start the GPDB5 cluster
      
      2). the type of the attnum field of the gp_distribution_policy had
      changed
      
      3). gp_toolkit is a view, and hence datatypes it contains that have been
      modified in GPDB6(such as name), need not be flagged as errors during
      pg_upgrade's check of the old cluster.
      
      4). index access method type 'bitmap' needs to be added to the exclusion
      list to select only bpchar_pattern_ops index access methods
      Co-authored-by: NJesse Zhang <jzhang@pivotal.io>
      ecd3400f
    • D
      pg_dump changes to dump a GPDB-5 cluster · b9036a0d
      David Krieger 提交于
      Minor modifications are made to pg_dump, to allow the table attributes
      and functions to be correctly dumped for a GPDB-5 cluster.  These
      changes essentially fix a bug, as the GPDB-6 pg_dump should be able to
      dump a GPDB-5 cluster.
      Co-authored-by: NJesse Zhang <jzhang@pivotal.io>
      b9036a0d
    • S
      Rename all HLL functions & structures in GPDB · 28a27125
      Shreedhar Hardikar 提交于
      They are renamed to start with a gp_/GP_/Gp prefix (as appropriate).
      This will prevent any namespace clashes when building & running external
      HLL-related GPDB extensions.
      
      I decided to keep the directory name that same since that doesn't matter
      for name conflicts, and none of the other directories in utils started
      with the gp_ prefix.
      28a27125