1. 28 5月, 2019 1 次提交
    • X
      Optimize explicit transactions · b43629be
      xiong-gang 提交于
      Currently, explicit 'BEGIN' creates a full-size writer gang and starts a transaction
      on it, the following 'END' will commit the transaction in a two-phase way. It can be
      optimized for some cases:
      case 1:
      BEGIN;
      SELECT * FROM pg_class;
      END;
      
      case 2:
      BEGIN;
      SELECT * FROM foo;
      SELECT * FROM bar;
      END;
      
      case 3:
      BEGIN;
      INSERT INTO foo VALUES(1);
      INSERT INTO bar VALUES(2);
      END;
      
      For case 1, it's unnecessary to create a gang and no need to have two-phase commit.
      For case 2, it's unnecessary to have two-phase commit as the executors don't write
      any XLOG.
      For case 3, don't have to create a full-size writer gang and do two-phase commit on
      a full-size gang.
      Co-authored-by: NJialun Du <jdu@pivotal.io>
      b43629be
  2. 22 5月, 2019 1 次提交
  3. 21 5月, 2019 1 次提交
  4. 19 5月, 2019 1 次提交
    • Z
      Correctly handle tablespace for GPexpand · 90357195
      Zhenghua Lyu 提交于
      GPexpand should take tablespaces into consideration. This means:
      
      1. during the interview step stage, if there are user-created
           tablespaces in GreeplumDB cluster, we should generate a
           tablespace input file for GPexpand. User can modify it to
           use customized tablespace location on each new segment (Since
           we support create tablespace ... with (contentid=loc) syntax).
      
        2. during the template generatition stage, we should pack tablespace
           files generated by pg_basebackup into the template, and saves the
           restore paths into a json config file which is also a part of the
           template.
      
        3. During the stage of config a new segment, we should restore the
           tablespace files for primary. For mirrors, we just invoke pg_basebackup
           which has already handled tablespace cases.
      
      An example of the whole process is shown below:
      
        * suppose there are tablespaces in the GreenplumDB cluster
        * tbs1 (oid1) -> location1; tbs2 (oid2) -> location2
        * and new segments are dbid1(primary), dbid2(mirror)
      
      The tablespace input file will be:
      ```
        line1: tableSpaceNameOrders=tbs1:tbs2
        line2: tableSpaceOidOrders=oid1:oid2
        dbid1:loc1:loc2
      ```
      
      The template's pg_tblspc dir will be:
        oid1
        oid2
        dumps
           |_ oid1
           |     |__ xxx_dbDummyID
           |
           |_ oid2
                 |__ xxx_dbDummyID
        newTableSpaceInfo.json
      90357195
  5. 17 5月, 2019 2 次提交
  6. 10 5月, 2019 1 次提交
    • W
      Declare a whitelist in gpstop for bgworker (#7455) · ea7d8ec3
      Weinan WANG 提交于
      At present, `gpstop` check `pg_stat_activity` table before stop cluster in smart model. However, we need to ignore those background workers that are part of the database implementation itself. For this purpose, we maintain a whitelist using its `application_name` field.
      ea7d8ec3
  7. 08 5月, 2019 1 次提交
  8. 04 5月, 2019 1 次提交
    • J
      Remove gpseginstall · 64014685
      Jamie McAtamney 提交于
      Now that the enterprise version of GPDB is only provided via RPM, including
      gpseginstall in the distribution would cause conflicts if users try to install
      GPDB with RPMs and with gpseginstall on the same cluster.  While it could be
      preserved for use by the OSS community, there are several standard tools for
      copying GPDB files to segment hosts in a cluster, and recommendations for using
      one or more of those tools will be included in the GPDB documentation.
      
      In addition to removing gpseginstall itself, this commit removes references to
      it in other utilities' documentation and removes code in gppylib that was only
      called by gpseginstall.
      Co-authored-by: NJamie McAtamney <jmcatamney@pivotal.io>
      Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
      64014685
  9. 02 5月, 2019 1 次提交
  10. 25 4月, 2019 2 次提交
  11. 13 4月, 2019 2 次提交
  12. 12 4月, 2019 2 次提交
  13. 10 4月, 2019 1 次提交
  14. 06 4月, 2019 5 次提交
  15. 05 4月, 2019 1 次提交
    • J
      UtilsTestCase: improve test reporting for flake · 0fe07f49
      Jacob Champion 提交于
      test_RemoteOperation_logger_debug() has been flaking out on the CI
      pipeline, and there's no indication of what is going wrong. Replace the
      assertTrue() call, which gives no indication of the difference between
      actual and expected, with mock.assert_has_calls(), which will tell us
      exactly what the calls were in case of failure.
      
      It's possible that this will fix the flake entirely. The previous test
      implementation depended on logger.debug() to be called *first* with our
      expected output, but given the poor isolation of our global logger
      system, it's entirely possible that some other code occasionally calls
      debug(). (That this is an issue at all indicates that this isn't really
      a unit test, but that's not something to tackle here.) assert_has_calls()
      doesn't mind how many other calls happen as long as the one we're
      looking for is eventually made, and I think that matches the intent of
      the test better anyway.
      
      Backport to 6X_STABLE.
      0fe07f49
  16. 04 4月, 2019 1 次提交
  17. 03 4月, 2019 1 次提交
    • J
      gppylib: remove race in WorkerPool progress test · 9f5384bc
      Jacob Champion 提交于
      Despite my best efforts to avoid races on overloaded test containers,
      test_join_and_indicate_progress_prints_dots_until_pool_is_done() has
      been failing fairly often. Replace the simple-but-flaky time-based test
      with an implementation that serializes the components of the race.
      9f5384bc
  18. 02 4月, 2019 1 次提交
    • J
      dbconn: don't commit a transaction for every connection · 5f128b2e
      Jacob Champion 提交于
      dbconn.connect() was using an odd pattern to set connection parameters
      like client_encoding -- it would SET these parameters after the
      connection was established and then issue a COMMIT. Even if your purpose
      for connecting was read-only, you'd need to wait for a commit (which
      also meant waiting for FTS, if a mirror was down). This is wasteful and
      slow. Let's set those parameters during connection instead.
      
      Now that we no longer wait for a transaction on connection, behave steps
      that relied on those transactions need to be modified. Add unit tests to
      cover the changed implementation.
      Co-authored-by: NDavid Kimura <dkimura@pivotal.io>
      5f128b2e
  19. 01 4月, 2019 3 次提交
  20. 29 3月, 2019 1 次提交
  21. 22 3月, 2019 3 次提交
  22. 21 3月, 2019 3 次提交
  23. 19 3月, 2019 1 次提交
  24. 18 3月, 2019 1 次提交
    • J
      Gpexpand minor fix (#7159) · cea594f0
      Jialun 提交于
      - get port from MASTER_DATA_DIRECTORY, so there is no confusion if
        PGPORT and MASTER_DATA_DIRECTORY are set to different clusters
      - delete tmp status file 'gpexpand.standby.status' and copy the
        status file to standby directly
      - get standby data directory from catalog instead of assuming its
        same with master
      - copy gp_segment_configuration backup file to standby also, so
        standby can restore this catalog if master is down
      cea594f0
  25. 14 3月, 2019 2 次提交