This is an automated email from the ASF dual-hosted git repository.

iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e8092a3b BIGTOP-3919: Bump GPDB to 6.23.4 (#1109)
5e8092a3b is described below

commit 5e8092a3b301e02a4ef47c9fe2795524af014166
Author: Yuqi Gu <[email protected]>
AuthorDate: Wed May 17 09:40:06 2023 +0800

    BIGTOP-3919: Bump GPDB to 6.23.4 (#1109)
    
    Signed-off-by: Yuqi Gu <[email protected]>
---
 .../puppet/modules/gpdb/manifests/init.pp          |  141 +-
 .../modules/gpdb/templates/creat-new-table.sh      |    2 +
 .../puppet/modules/gpdb/templates/init-db.sh       |    2 +-
 .../templates/insert-to-faultStrategy-table.sh     |    2 -
 .../modules/gpdb/templates/insert-to-new-table.sh  |    2 +
 .../templates/insert-to-segmentConfig-table.sh     |    2 -
 .../puppet/modules/gpdb/templates/postmaster.opts  |    1 -
 .../templates/start-master-db-in-admin-mode.sh     |    2 +-
 .../modules/gpdb/templates/test-master-db.sh       |    2 +-
 .../src/common/gpdb/do-component-configure         |    2 +-
 .../src/common/gpdb/patch0-DISTDIR.diff            |   27 -
 .../patch0-declare-python-version-explicitly.diff  |  530 ++++
 .../common/gpdb/patch1-specify-python-version.diff | 2793 --------------------
 ...fix-deprecated-first-element-index-in-perl.diff |  106 -
 bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec       |    2 +
 bigtop-tests/smoke-tests/gpdb/TestGpdb.groovy      |   10 +-
 bigtop.bom                                         |    2 +-
 17 files changed, 569 insertions(+), 3059 deletions(-)

diff --git a/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp 
b/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
index 9795b1db9..b287644be 100644
--- a/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/gpdb/manifests/init.pp
@@ -43,17 +43,7 @@ class gpdb {
       require             => [Class['gpdb::common::prepare_file_structure'], 
Exec["install_python_packages"]]
     }
 
-    gpdb::server{"stop_if_running":
-      nodes                   => $gpdb::common::nodes,
-      gp_home                 => $gpdb::common::gp_home,
-      db_base_dir             => $gpdb::common::db_base_dir,
-      master_db_port          => $gpdb::common::master_db_port,
-      segment_db_port_prefix  => $gpdb::common::segment_db_port_prefix,
-      require                 => Class['gpdb::common::prepare_db_dirs'],
-      start_or_stop           => stopped,
-    }
-
-    class { 'gpdb::common::configure_master_node':
+    class { 'gpdb::common::start_master_node':
       base_dir            => "$db_base_dir",
       nodes               => $nodes,
       gp_home             => $gp_home,
@@ -62,24 +52,6 @@ class gpdb {
       require             => Class['gpdb::common::prepare_db_dirs']
     }
 
-    class { 'gpdb::common::stop_master_in_admin_mode':
-      base_dir      => "$db_base_dir",
-      nodes         => $nodes,
-      gp_home       => $gp_home,
-      master_port   => $master_db_port,
-      require       => Class['gpdb::common::configure_master_node']
-    }
-
-    gpdb::server{"start":
-      nodes                   => $gpdb::common::nodes,
-      gp_home                 => $gpdb::common::gp_home,
-      db_base_dir             => $gpdb::common::db_base_dir,
-      master_db_port          => $gpdb::common::master_db_port,
-      segment_db_port_prefix  => $gpdb::common::segment_db_port_prefix,
-      require                 => [ Gpdb::Server["stop_if_running"], 
Class['gpdb::common::stop_master_in_admin_mode'] ],
-      start_or_stop           => running,
-    }
-
     class gpadmin_user{
       group { 'gpadmin':
         ensure => 'present',
@@ -209,6 +181,11 @@ class gpdb {
             line    => "port=${port}",
             require => [Exec["create_master_db${db_dir}"]],
           }
+          file_line { "add 4 conf${db_dir}":
+            path    => "${db_dir}/postgresql.conf",
+            line    => 'logging_collector = off',
+            require => [Exec["create_master_db${db_dir}"]],
+          }
           file { "${db_dir}/gp_dbid":
             content => template('gpdb/gp_dbid'),
             require => [Exec["create_master_db${db_dir}"]],
@@ -223,40 +200,12 @@ class gpdb {
             group   => 'gpadmin',
             mode    => '0700',
           }
-          file { "${db_dir}/postmaster.opts":
-            content => template('gpdb/postmaster.opts'),
-            require => [Exec["create_master_db${db_dir}"]],
-            owner   => 'gpadmin',
-            group   => 'gpadmin',
-            mode    => '0700',
-          }
-          file { "${db_dir}/run.opts":
-            source  => "${db_dir}/postmaster.opts",
-            ensure  => present,
-            require => [File["${db_dir}/postmaster.opts"]],
-            owner   => 'gpadmin',
-            group   => 'gpadmin',
-            mode    => '0700',
-          }
         }
       }
     }
 
-    class stop_master_in_admin_mode($nodes = undef, $base_dir = undef, 
$gp_home = undef, $master_port = undef){
-      if ($::fqdn == $nodes[0]) {
-        exec { 'stop-master-db-in-admin-mode':
-          command => "stop-db.sh $base_dir/master/gpseg-1 $master_port",
-          path    => '/home/gpadmin',
-          user    => 'gpadmin',
-          require => [
-            Exec["create_master_db$base_dir/master/gpseg-1"],
-            File['/home/gpadmin/stop-db.sh']
-          ],
-        }
-      }
-    }
 
-    class configure_master_node($nodes = undef, $base_dir = undef, $gp_home = 
undef, $master_port = undef, $segment_port_prefix = undef){
+    class start_master_node($nodes = undef, $base_dir = undef, $gp_home = 
undef, $master_port = undef, $segment_port_prefix = undef){
       if ($::fqdn == $nodes[0]) {
         notice("must make admin")
         file { '/home/gpadmin/start-master-db-in-admin-mode.sh':
@@ -282,83 +231,39 @@ class gpdb {
             File['/home/gpadmin/start-master-db-in-admin-mode.sh']
           ],
         }
-        file { '/home/gpadmin/insert-to-segmentConfig-table.sh':
-          content => template('gpdb/insert-to-segmentConfig-table.sh'),
+        file { '/home/gpadmin/creat-new-table.sh':
+          content => template('gpdb/creat-new-table.sh'),
           require => [Exec["start-master-db-in-admin-mode"]],
           owner   => 'gpadmin',
           group   => 'gpadmin',
           mode    => '0700',
         }
-        file { '/home/gpadmin/insert-to-faultStrategy-table.sh':
-          content => template('gpdb/insert-to-faultStrategy-table.sh'),
+        file { '/home/gpadmin/insert-to-new-table.sh':
+          content => template('gpdb/insert-to-new-table.sh'),
           require => [Exec["start-master-db-in-admin-mode"]],
           owner   => 'gpadmin',
           group   => 'gpadmin',
           mode    => '0700',
         }
-        exec { "insert-to-faultStrategy-table":
+        exec { "creat-new-table":
           environment => ["PGOPTIONS=-c gp_session_role=utility"],
-          command     => "insert-to-faultStrategy-table.sh",
+          command     => "creat-new-table.sh",
           path        => '/home/gpadmin',
           user        => 'gpadmin',
           require     => [
-            File["/home/gpadmin/insert-to-faultStrategy-table.sh"],
+            File["/home/gpadmin/creat-new-table.sh"],
             Exec['start-master-db-in-admin-mode'],
           ],
         }
-        each($nodes) |$index, $value| {
-          $dbid = $index+1
-          $content = $index-1
-          $hostname = $value
-          if ($dbid == 1){
-            $port = $master_port
-            $db_sub_dir = "master"
-            $m_options = "master"
-            $x_options = "\"-x\" \"0\" \"-c\" \"gp_role=utility\""
-            $z_options = "0"
-          } else{
-            $port = "$segment_port_prefix${content}"
-            $db_sub_dir = "primary"
-            $m_options = "mirrorless"
-            $x_options = ""
-            $z_options = "3"
-          }
-          $db_dir = "$base_dir/${db_sub_dir}/gpseg${content}"
-          notice("${dbid} - ${content} - ${port} - ${hostname} - ${db_dir}")
-          exec { "insert-to-segmentConfig-table${dbid}":
-            environment => ["PGOPTIONS=-c gp_session_role=utility"],
-            command     => "insert-to-segmentConfig-table.sh ${dbid} 
${content} ${port} ${value} ${db_dir}",
-            path        => '/home/gpadmin',
-            user        => 'gpadmin',
-            require     => [
-              File["/home/gpadmin/insert-to-segmentConfig-table.sh"],
-              Exec['start-master-db-in-admin-mode'],
-            ],
-          }
-        }
-      }
-    }
-  }
-
-  define server($nodes, $gp_home, $db_base_dir, $master_db_port, 
$segment_db_port_prefix, $start_or_stop){
-    each($nodes) |$index, $value| {
-      $content = $index-1
-      if ($::fqdn == $value) {
-        if ($index == 0){
-          $db_sub_dir = "master"
-          $port = $master_db_port
-        }else{
-          $db_sub_dir = "primary"
-          $port = "$segment_db_port_prefix${content}"
-        }
-        $db_dir = "$db_base_dir/${db_sub_dir}/gpseg${content}"
-        service { "gpdb${content}${start_or_stop}":
-          provider  => base,
-          ensure    => $start_or_stop,
-          start     => "su -l gpadmin -m $db_dir/run.opts",
-          stop      => "su -l gpadmin -m /home/gpadmin/stop-db.sh $db_dir 
$port",
-          hasstatus => false,
-          pattern   => "${db_dir}",
+        exec { "insert-to-new-table${dbid}":
+          environment => ["PGOPTIONS=-c gp_session_role=utility"],
+          command     => "insert-to-new-table.sh",
+          path        => '/home/gpadmin',
+          user        => 'gpadmin',
+          require     => [
+            File["/home/gpadmin/insert-to-new-table.sh"],
+            Exec['creat-new-table'],
+          ],
         }
       }
     }
diff --git a/bigtop-deploy/puppet/modules/gpdb/templates/creat-new-table.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/creat-new-table.sh
new file mode 100755
index 000000000..679a26417
--- /dev/null
+++ b/bigtop-deploy/puppet/modules/gpdb/templates/creat-new-table.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+export PGOPTIONS="-c gp_session_role=utility";<%= @gp_home %>/bin/psql -p <%= 
@master_port %> -d "template1" -c "CREATE TABLE bigtopusers (id integer, name 
text, age numeric);" || true
diff --git a/bigtop-deploy/puppet/modules/gpdb/templates/init-db.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/init-db.sh
index 5976728f4..456f217d3 100755
--- a/bigtop-deploy/puppet/modules/gpdb/templates/init-db.sh
+++ b/bigtop-deploy/puppet/modules/gpdb/templates/init-db.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 if [ ! -d $1 ]; then
-  export LD_LIBRARY_PATH=<%= @gp_home %>/lib:/lib;<%= @gp_home %>/bin/initdb  
-E UNICODE -D $1 --locale=en_US.utf8 --max_connections=750 
--shared_buffers=128000kB --is_filerep_mirrored=no --backend_output=$1.initdb
+  export LD_LIBRARY_PATH=<%= @gp_home %>/lib:/lib;<%= @gp_home %>/bin/initdb 
-E UNICODE -D $1 --max_connections=750 --shared_buffers=128000kB 
--backend_output=$1.initdb
 fi
diff --git 
a/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-faultStrategy-table.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-faultStrategy-table.sh
deleted file mode 100755
index c1f9769c4..000000000
--- 
a/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-faultStrategy-table.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-<%= @gp_home %>/bin/psql -p <%= @master_port %> -d "template1" -c "insert into 
gp_fault_strategy(fault_strategy) values ('n');" || true
diff --git a/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-new-table.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-new-table.sh
new file mode 100755
index 000000000..6dd6e5ba7
--- /dev/null
+++ b/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-new-table.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+export PGOPTIONS="-c gp_session_role=utility";<%= @gp_home %>/bin/psql -p <%= 
@master_port %> -d "template1" -c "INSERT INTO bigtopusers (name, age) VALUES 
('Jack', 28);" || true
diff --git 
a/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-segmentConfig-table.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-segmentConfig-table.sh
deleted file mode 100755
index 5e4b3816f..000000000
--- 
a/bigtop-deploy/puppet/modules/gpdb/templates/insert-to-segmentConfig-table.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-<%= @gp_home %>/bin/psql -p <%= @master_port %> -d "template1" -c "INSERT INTO 
gp_segment_configuration (dbid, content, role, preferred_role, mode, status, 
hostname, address, port, replication_port) VALUES ($1, $2, 'p', 'p', 's', 'u', 
'$4', '$4', $3, null);insert into pg_filespace_entry (fsefsoid, fsedbid, 
fselocation) values (3052, $1, '$5');" || true
diff --git a/bigtop-deploy/puppet/modules/gpdb/templates/postmaster.opts 
b/bigtop-deploy/puppet/modules/gpdb/templates/postmaster.opts
deleted file mode 100755
index e8976359c..000000000
--- a/bigtop-deploy/puppet/modules/gpdb/templates/postmaster.opts
+++ /dev/null
@@ -1 +0,0 @@
-<%= @gp_home %>/bin/postgres -D <%= @db_dir %> -p <%= @port %> --gp_dbid=<%= 
@dbid %> --gp_num_contents_in_cluster=<%= @z_options %> --silent-mode=true -i 
-M <%= @m_options %> --gp_contentid=<%= @content %> <%= @x_options %>
diff --git 
a/bigtop-deploy/puppet/modules/gpdb/templates/start-master-db-in-admin-mode.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/start-master-db-in-admin-mode.sh
index 441492d5c..109abe56a 100755
--- 
a/bigtop-deploy/puppet/modules/gpdb/templates/start-master-db-in-admin-mode.sh
+++ 
b/bigtop-deploy/puppet/modules/gpdb/templates/start-master-db-in-admin-mode.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-export PGPORT=<%= @master_port %>; <%= @gp_home %>/bin/pg_ctl -w -l 
$1/pg_log/startup.log -D $1 -o "-p <%= @master_port %> --gp_dbid=1 
--gp_num_contents_in_cluster=0 --silent-mode=true -i -M master 
--gp_contentid=-1 -x 0 -c gp_role=utility -m" start
+export PGPORT=<%= @master_port %>;<%= @gp_home %>/bin/pg_ctl -w -l 
$1/pg_log/startup.log -D $1 -o "-p <%= @master_port %> --gp_dbid=1 -i 
--gp_contentid=-1 -c gp_role=utility -m" start
diff --git a/bigtop-deploy/puppet/modules/gpdb/templates/test-master-db.sh 
b/bigtop-deploy/puppet/modules/gpdb/templates/test-master-db.sh
index 0934dbb74..0ea4cc407 100644
--- a/bigtop-deploy/puppet/modules/gpdb/templates/test-master-db.sh
+++ b/bigtop-deploy/puppet/modules/gpdb/templates/test-master-db.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-<%= @gp_home %>/bin/psql -p <%= @master_port %> -d "template1" -c "select 
count(*) from gp_segment_configuration;"
+export PGOPTIONS="-c gp_session_role=utility";<%= @gp_home %>/bin/psql -p <%= 
@master_port %> -d "template1" -c "select age from bigtopusers;"
diff --git a/bigtop-packages/src/common/gpdb/do-component-configure 
b/bigtop-packages/src/common/gpdb/do-component-configure
index 93b7b10da..51355b661 100644
--- a/bigtop-packages/src/common/gpdb/do-component-configure
+++ b/bigtop-packages/src/common/gpdb/do-component-configure
@@ -16,4 +16,4 @@
 
 set -ex
 
-./configure --prefix=$1 --disable-orca CFLAGS=-fcommon
+./configure --prefix=$1 --with-python --with-libxml --with-gssapi 
--disable-orca CFLAGS='-fcommon -Wno-implicit-fallthrough'
diff --git a/bigtop-packages/src/common/gpdb/patch0-DISTDIR.diff 
b/bigtop-packages/src/common/gpdb/patch0-DISTDIR.diff
deleted file mode 100644
index a61bb2bb4..000000000
--- a/bigtop-packages/src/common/gpdb/patch0-DISTDIR.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/gpAux/extensions/gpcloud/Makefile 
b/gpAux/extensions/gpcloud/Makefile
-index 516b4ee..e8370f2 100644
---- a/gpAux/extensions/gpcloud/Makefile
-+++ b/gpAux/extensions/gpcloud/Makefile
-@@ -32,7 +32,7 @@ gpcheckcloud:
- install: install-symlink
- 
- install-symlink:
--      ln -sf gpcloud.so $(pkglibdir)/gps3ext.so
-+      ln -sf gpcloud.so $(DESTDIR)/$(pkglibdir)/gps3ext.so
- 
- test: format
-       @$(MAKE) -C test test
-diff --git a/gpAux/platform/gpnetbench/Makefile 
b/gpAux/platform/gpnetbench/Makefile
-index dff409f..6fd74bf 100644
---- a/gpAux/platform/gpnetbench/Makefile
-+++ b/gpAux/platform/gpnetbench/Makefile
-@@ -25,6 +25,6 @@ clean:
-       rm -rf *.o gpnetbenchServer gpnetbenchClient
- 
- install: all
--      mkdir -p $(prefix)/bin/lib
--      cp -p gpnetbenchServer $(prefix)/bin/lib
--      cp -p gpnetbenchClient $(prefix)/bin/lib
-+      mkdir -p $(DESTDIR)/$(prefix)/bin/lib
-+      cp -p gpnetbenchServer $(DESTDIR)/$(prefix)/bin/lib
-+      cp -p gpnetbenchClient $(DESTDIR)/$(prefix)/bin/lib
diff --git 
a/bigtop-packages/src/common/gpdb/patch0-declare-python-version-explicitly.diff 
b/bigtop-packages/src/common/gpdb/patch0-declare-python-version-explicitly.diff
new file mode 100644
index 000000000..b58487b30
--- /dev/null
+++ 
b/bigtop-packages/src/common/gpdb/patch0-declare-python-version-explicitly.diff
@@ -0,0 +1,530 @@
+diff --git a/gpMgmt/bin/analyzedb b/gpMgmt/bin/analyzedb
+index 462a207cc0..551d1c842a 100755
+--- a/gpMgmt/bin/analyzedb
++++ b/gpMgmt/bin/analyzedb
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ 
+ # Copyright (c) 2015 Pivotal Software, Inc. All Rights Reserved
+diff --git a/gpMgmt/bin/gpactivatestandby b/gpMgmt/bin/gpactivatestandby
+index 0f1dd22fb5..2ae64ee220 100755
+--- a/gpMgmt/bin/gpactivatestandby
++++ b/gpMgmt/bin/gpactivatestandby
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ # Line too long - pylint: disable=C0301
+ # Invalid name  - pylint: disable=C0103
+diff --git a/gpMgmt/bin/gpaddmirrors b/gpMgmt/bin/gpaddmirrors
+index a7c368071e..1f4e7665c6 100755
+--- a/gpMgmt/bin/gpaddmirrors
++++ b/gpMgmt/bin/gpaddmirrors
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Recovers Greenplum segment instances that are marked as invalid, if
+ # mirroring is configured and operational
+diff --git a/gpMgmt/bin/gpcheckcat b/gpMgmt/bin/gpcheckcat
+index a2c5f29377..98dc067abc 100755
+--- a/gpMgmt/bin/gpcheckcat
++++ b/gpMgmt/bin/gpcheckcat
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ '''
+ Usage: gpcheckcat [<option>] [dbname]
+ 
+diff --git a/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py 
b/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
+index 5259974af9..7996d8eed0 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
++++ b/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ from gppylib.gplog import *
+ from gppylib.gpcatalog import *
+diff --git a/gpMgmt/bin/gpcheckcat_modules/orphan_toast_table_issues.py 
b/gpMgmt/bin/gpcheckcat_modules/orphan_toast_table_issues.py
+index b25af69351..976ad0ed15 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/orphan_toast_table_issues.py
++++ b/gpMgmt/bin/gpcheckcat_modules/orphan_toast_table_issues.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ 
+ class OrphanToastTableIssue(object):
+diff --git a/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py 
b/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
+index bb0df7f52b..b3df5ab0a7 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
++++ b/gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ import itertools
+ 
+diff --git a/gpMgmt/bin/gpcheckcat_modules/repair.py 
b/gpMgmt/bin/gpcheckcat_modules/repair.py
+index b46fe6c1c8..7298a17fde 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/repair.py
++++ b/gpMgmt/bin/gpcheckcat_modules/repair.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ Purpose : Creates the repair dir and the corresponding sql/bash scripts for
+           repairing some of the catalog issues(see the list below) reported 
by gpcheckcat.
+diff --git a/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py 
b/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
+index dbd040dbe9..623ce7f8f0 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
++++ b/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ from gppylib.utils import escapeDoubleQuoteInSQLString
+ 
+ class RepairMissingExtraneous:
+diff --git a/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py 
b/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
+index 8bf847a839..e385eaca5f 100644
+--- a/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
++++ b/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ class UniqueIndexViolationCheck:
+     unique_indexes_query = """
+diff --git a/gpMgmt/bin/gpcheckperf b/gpMgmt/bin/gpcheckperf
+index 798e815aa4..6615365c60 100755
+--- a/gpMgmt/bin/gpcheckperf
++++ b/gpMgmt/bin/gpcheckperf
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ gpcheckperf -- Check the hardware for Greenplum Database
+ 
+diff --git a/gpMgmt/bin/gpcheckresgroupimpl b/gpMgmt/bin/gpcheckresgroupimpl
+index c451ee64fc..9a9394d1a5 100755
+--- a/gpMgmt/bin/gpcheckresgroupimpl
++++ b/gpMgmt/bin/gpcheckresgroupimpl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) 2017, Pivotal Software Inc.
+ #
+diff --git a/gpMgmt/bin/gpconfig b/gpMgmt/bin/gpconfig
+index b31a6d38f2..a65a118809 100755
+--- a/gpMgmt/bin/gpconfig
++++ b/gpMgmt/bin/gpconfig
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gpdeletesystem b/gpMgmt/bin/gpdeletesystem
+index 145709b627..0811ef5a87 100755
+--- a/gpMgmt/bin/gpdeletesystem
++++ b/gpMgmt/bin/gpdeletesystem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ #
+ # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
+diff --git a/gpMgmt/bin/gpexpand b/gpMgmt/bin/gpexpand
+index 7e9e5be6dc..0c36dbc332 100755
+--- a/gpMgmt/bin/gpexpand
++++ b/gpMgmt/bin/gpexpand
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Line too long            - pylint: disable=C0301
+ # Invalid name             - pylint: disable=C0103
+ #
+diff --git a/gpMgmt/bin/gpinitstandby b/gpMgmt/bin/gpinitstandby
+index d3a36ea993..2e9b7157df 100755
+--- a/gpMgmt/bin/gpinitstandby
++++ b/gpMgmt/bin/gpinitstandby
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ #
+ # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
+diff --git a/gpMgmt/bin/gpload.py b/gpMgmt/bin/gpload.py
+index d96b78694e..9668fc0fae 100755
+--- a/gpMgmt/bin/gpload.py
++++ b/gpMgmt/bin/gpload.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ # gpload - load file(s) into Greenplum Database
+ # Copyright Greenplum 2008
+diff --git a/gpMgmt/bin/gplogfilter b/gpMgmt/bin/gplogfilter
+index 09f36cf2f1..abd086283e 100755
+--- a/gpMgmt/bin/gplogfilter
++++ b/gpMgmt/bin/gplogfilter
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ #
+ # gplogfilter [options] [inputfile]...
+diff --git a/gpMgmt/bin/gpmemreport b/gpMgmt/bin/gpmemreport
+index c9a9df5e76..d3e36c7f51 100755
+--- a/gpMgmt/bin/gpmemreport
++++ b/gpMgmt/bin/gpmemreport
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright 2021 VMware, Inc.
+ # SPDX-License-Identifier: Apache-2.0
+diff --git a/gpMgmt/bin/gpmemwatcher b/gpMgmt/bin/gpmemwatcher
+index e99cfd3564..dd8fc4b7ad 100755
+--- a/gpMgmt/bin/gpmemwatcher
++++ b/gpMgmt/bin/gpmemwatcher
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright 2021 VMware, Inc.
+ # SPDX-License-Identifier: Apache-2.0
+diff --git a/gpMgmt/bin/gpmovemirrors b/gpMgmt/bin/gpmovemirrors
+index eda5f226d0..22760982f5 100755
+--- a/gpMgmt/bin/gpmovemirrors
++++ b/gpMgmt/bin/gpmovemirrors
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Line too long            - pylint: disable=C0301
+ # Invalid name             - pylint: disable=C0103
+ #
+diff --git a/gpMgmt/bin/gppkg b/gpMgmt/bin/gppkg
+index 24a09b2dae..f789e141ee 100755
+--- a/gpMgmt/bin/gppkg
++++ b/gpMgmt/bin/gppkg
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python 
++#!/usr/bin/env python2 
+ #
+ # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gppylib/commands/base.py 
b/gpMgmt/bin/gppylib/commands/base.py
+index 138ffc679c..4ac17e982b 100755
+--- a/gpMgmt/bin/gppylib/commands/base.py
++++ b/gpMgmt/bin/gppylib/commands/base.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gppylib/gparray.py b/gpMgmt/bin/gppylib/gparray.py
+index 4b50da8a5d..d680038228 100755
+--- a/gpMgmt/bin/gppylib/gparray.py
++++ b/gpMgmt/bin/gppylib/gparray.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gppylib/gpunit b/gpMgmt/bin/gppylib/gpunit
+index 4ea2e2ccea..806c542a2d 100755
+--- a/gpMgmt/bin/gppylib/gpunit
++++ b/gpMgmt/bin/gppylib/gpunit
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+ 
+ """
+ gpunit is similar to unit2 in python but runs with our GpMgmtTestRunner and 
GpMgmtTextTestResult.
+diff --git a/gpMgmt/bin/gppylib/operations/initstandby.py 
b/gpMgmt/bin/gppylib/operations/initstandby.py
+index 1b508aa748..33fc7f574b 100755
+--- a/gpMgmt/bin/gppylib/operations/initstandby.py
++++ b/gpMgmt/bin/gppylib/operations/initstandby.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ import os
+ import base64
+diff --git a/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py 
b/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
+index fda2e70b6c..dd3e348a2d 100755
+--- a/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
++++ b/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Line too long - pylint: disable=C0301
+ # Invalid name  - pylint: disable=C0103
+ 
+diff --git a/gpMgmt/bin/gppylib/unit2 b/gpMgmt/bin/gppylib/unit2
+index 08d1006a20..cc4e857ad4 100755
+--- a/gpMgmt/bin/gppylib/unit2
++++ b/gpMgmt/bin/gppylib/unit2
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+ 
+ __unittest = True
+ 
+diff --git a/gpMgmt/bin/gprecoverseg b/gpMgmt/bin/gprecoverseg
+index 777852a0ba..7a3fbbf545 100755
+--- a/gpMgmt/bin/gprecoverseg
++++ b/gpMgmt/bin/gprecoverseg
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ gprecoverseg
+ 
+diff --git a/gpMgmt/bin/gpreload b/gpMgmt/bin/gpreload
+index c2a5765255..cffc4a592d 100755
+--- a/gpMgmt/bin/gpreload
++++ b/gpMgmt/bin/gpreload
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ from gppylib.mainUtils import simple_main
+ from gppylib.operations.reload import GpReload
+diff --git a/gpMgmt/bin/gpscp b/gpMgmt/bin/gpscp
+index 882139c82e..f43cddf0c7 100755
+--- a/gpMgmt/bin/gpscp
++++ b/gpMgmt/bin/gpscp
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ '''
+ gpscp -- scp to multiple hosts at once
+diff --git a/gpMgmt/bin/gpsd b/gpMgmt/bin/gpsd
+index 3599bd1192..1da50c58d3 100755
+--- a/gpMgmt/bin/gpsd
++++ b/gpMgmt/bin/gpsd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Copyright (c) 2014 Pivotal inc.
+ 
+ 
+diff --git a/gpMgmt/bin/gpssh b/gpMgmt/bin/gpssh
+index fd8cab3ae0..ef0b81f532 100755
+--- a/gpMgmt/bin/gpssh
++++ b/gpMgmt/bin/gpssh
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ '''
+ gpssh -- ssh access to multiple hosts at once
+diff --git a/gpMgmt/bin/gpssh-exkeys b/gpMgmt/bin/gpssh-exkeys
+index 2eb9acb73c..68a3acb21f 100755
+--- a/gpMgmt/bin/gpssh-exkeys
++++ b/gpMgmt/bin/gpssh-exkeys
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- indent-tabs-mode: nil; tab-width:4 -*-
+ # vim:set tabstop=4 expandtab:
+ '''
+diff --git a/gpMgmt/bin/gpstart b/gpMgmt/bin/gpstart
+index ad9ee9c297..7ad8530d84 100755
+--- a/gpMgmt/bin/gpstart
++++ b/gpMgmt/bin/gpstart
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gpstate b/gpMgmt/bin/gpstate
+index bbbf8c4383..d0f45d048e 100755
+--- a/gpMgmt/bin/gpstate
++++ b/gpMgmt/bin/gpstate
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Displays system status information
+ #
+diff --git a/gpMgmt/bin/gpstop b/gpMgmt/bin/gpstop
+index 1b1afdbb77..89c974724b 100755
+--- a/gpMgmt/bin/gpstop
++++ b/gpMgmt/bin/gpstop
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
+ #
+diff --git a/gpMgmt/bin/gpsys1 b/gpMgmt/bin/gpsys1
+index e57ebc6c08..44999548a9 100755
+--- a/gpMgmt/bin/gpsys1
++++ b/gpMgmt/bin/gpsys1
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ gpsys1 -- print system info on a host
+ 
+diff --git a/gpMgmt/bin/lib/gpconfigurenewsegment 
b/gpMgmt/bin/lib/gpconfigurenewsegment
+index fe4eb85807..b9435d9565 100755
+--- a/gpMgmt/bin/lib/gpconfigurenewsegment
++++ b/gpMgmt/bin/lib/gpconfigurenewsegment
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ import datetime
+ import sys
+diff --git a/gpMgmt/bin/lib/gppinggpfdist.py b/gpMgmt/bin/lib/gppinggpfdist.py
+index 419fdaad39..6ba80cb18b 100644
+--- a/gpMgmt/bin/lib/gppinggpfdist.py
++++ b/gpMgmt/bin/lib/gppinggpfdist.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ import sys, httplib, getopt, socket
+ 
+diff --git a/gpMgmt/bin/lib/gpstate.py b/gpMgmt/bin/lib/gpstate.py
+index 33d19e80fc..b9c64dc157 100755
+--- a/gpMgmt/bin/lib/gpstate.py
++++ b/gpMgmt/bin/lib/gpstate.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Recovers Greenplum segment instances that are marked as invalid, if
+ # mirroring is configured and operational
+diff --git a/gpMgmt/bin/lib/multidd b/gpMgmt/bin/lib/multidd
+index 59703f2c92..efa4b2858d 100755
+--- a/gpMgmt/bin/lib/multidd
++++ b/gpMgmt/bin/lib/multidd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ """
+ multidd - run multiple dd concurrently to determine disk throughput
+ 
+diff --git a/gpMgmt/bin/minirepro b/gpMgmt/bin/minirepro
+index bdeea5911d..27a33ebbd3 100755
+--- a/gpMgmt/bin/minirepro
++++ b/gpMgmt/bin/minirepro
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ '''
+ minirepro utility
+ 
+diff --git a/gpMgmt/sbin/gpcleansegmentdir.py 
b/gpMgmt/sbin/gpcleansegmentdir.py
+index 29e2b47c8f..b0d54abb5a 100755
+--- a/gpMgmt/sbin/gpcleansegmentdir.py
++++ b/gpMgmt/sbin/gpcleansegmentdir.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
+ #
+diff --git a/gpMgmt/sbin/gpconfig_helper.py b/gpMgmt/sbin/gpconfig_helper.py
+index bac06f4f25..3f1bee8b44 100755
+--- a/gpMgmt/sbin/gpconfig_helper.py
++++ b/gpMgmt/sbin/gpconfig_helper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
+ #
+diff --git a/gpMgmt/sbin/gpgetstatususingtransition.py 
b/gpMgmt/sbin/gpgetstatususingtransition.py
+index 5bde9e13ae..fdde978592 100755
+--- a/gpMgmt/sbin/gpgetstatususingtransition.py
++++ b/gpMgmt/sbin/gpgetstatususingtransition.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
+ #
+diff --git a/gpMgmt/sbin/gpoperation.py b/gpMgmt/sbin/gpoperation.py
+index 2383a807b2..639e2ed1ed 100755
+--- a/gpMgmt/sbin/gpoperation.py
++++ b/gpMgmt/sbin/gpoperation.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import sys
+ import pickle
+ import traceback
+diff --git a/gpMgmt/sbin/gpsegrecovery.py b/gpMgmt/sbin/gpsegrecovery.py
+index 16b85a3e68..50bc781c5d 100644
+--- a/gpMgmt/sbin/gpsegrecovery.py
++++ b/gpMgmt/sbin/gpsegrecovery.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ 
+ from gppylib.recoveryinfo import RecoveryErrorType
+ from gppylib.commands.pg import PgBaseBackup, PgRewind
+diff --git a/gpMgmt/sbin/gpsegsetuprecovery.py 
b/gpMgmt/sbin/gpsegsetuprecovery.py
+index 7da69d06f7..adb5a38810 100644
+--- a/gpMgmt/sbin/gpsegsetuprecovery.py
++++ b/gpMgmt/sbin/gpsegsetuprecovery.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import os
+ 
+ from gppylib import recoveryinfo
+diff --git a/gpMgmt/sbin/gpsegstart.py b/gpMgmt/sbin/gpsegstart.py
+index 0dee2d6f9e..bb2fd8f23c 100755
+--- a/gpMgmt/sbin/gpsegstart.py
++++ b/gpMgmt/sbin/gpsegstart.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Line too long - pylint: disable=C0301
+ # Invalid name  - pylint: disable=C0103
+ #
+diff --git a/gpMgmt/sbin/gpsegstop.py b/gpMgmt/sbin/gpsegstop.py
+index 5a88775dc2..b4c7fccbd1 100755
+--- a/gpMgmt/sbin/gpsegstop.py
++++ b/gpMgmt/sbin/gpsegstop.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #
+ # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
+ #
+diff --git a/gpMgmt/sbin/packcore b/gpMgmt/sbin/packcore
+index e65355cd24..9ade7c266e 100755
+--- a/gpMgmt/sbin/packcore
++++ b/gpMgmt/sbin/packcore
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # Copyright Pivotal 2014
+ 
+ 
+diff --git a/gpMgmt/sbin/seg_update_pg_hba.py 
b/gpMgmt/sbin/seg_update_pg_hba.py
+index 8ef70ac1a0..e4cd1c6840 100755
+--- a/gpMgmt/sbin/seg_update_pg_hba.py
++++ b/gpMgmt/sbin/seg_update_pg_hba.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import os
+ import re
+ import sys
diff --git a/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff 
b/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff
deleted file mode 100644
index ea7804a25..000000000
--- a/bigtop-packages/src/common/gpdb/patch1-specify-python-version.diff
+++ /dev/null
@@ -1,2793 +0,0 @@
-diff --git a/concourse/pipelines/gen_pipeline.py 
b/concourse/pipelines/gen_pipeline.py
-index 1cdc3bd1ad..08e8aaa2a5 100755
---- a/concourse/pipelines/gen_pipeline.py
-+++ b/concourse/pipelines/gen_pipeline.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # ----------------------------------------------------------------------
- # Licensed to the Apache Software Foundation (ASF) under one
- # or more contributor license agreements.  See the NOTICE file
-diff --git a/gpAux/Makefile.global b/gpAux/Makefile.global
-index c35fdd762d..0ad078975d 100644
---- a/gpAux/Makefile.global
-+++ b/gpAux/Makefile.global
-@@ -104,7 +104,7 @@ endif
- 
- export PYTHON=python
- ifneq "$(PYTHONHOME)" ""
--export PYTHON=$(PYTHONHOME)/bin/python
-+export PYTHON=$(PYTHONHOME)/bin/python2
- aix5_ppc_32_PYTHON=$(PYTHONHOME)/bin/python2.7
- aix5_ppc_64_PYTHON=$(PYTHONHOME)/bin/python2.7_64
- aix7_ppc_64_PYTHON=$(PYTHONHOME)/bin/python2.7_64
-diff --git a/gpAux/extensions/gpcloud/bin/dummyHTTPServer.py 
b/gpAux/extensions/gpcloud/bin/dummyHTTPServer.py
-index 0cfeafbc4d..118c479c4a 100755
---- a/gpAux/extensions/gpcloud/bin/dummyHTTPServer.py
-+++ b/gpAux/extensions/gpcloud/bin/dummyHTTPServer.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Very simple HTTP server in python.
-diff --git a/gpAux/extensions/gphdfs/regression/input/parsefile.py 
b/gpAux/extensions/gphdfs/regression/input/parsefile.py
-index bc06480010..457ea706eb 100755
---- a/gpAux/extensions/gphdfs/regression/input/parsefile.py
-+++ b/gpAux/extensions/gphdfs/regression/input/parsefile.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
-diff --git a/gpAux/extensions/gphdfs/regression/input/regression/createData.py 
b/gpAux/extensions/gphdfs/regression/input/regression/createData.py
-index b3bc033b91..11370c8121 100755
---- a/gpAux/extensions/gphdfs/regression/input/regression/createData.py
-+++ b/gpAux/extensions/gphdfs/regression/input/regression/createData.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
- 
-diff --git 
a/gpAux/extensions/gphdfs/regression/input/regression/printLargeTable.py 
b/gpAux/extensions/gphdfs/regression/input/regression/printLargeTable.py
-index c594a07cb9..6b9c5cfe7a 100755
---- a/gpAux/extensions/gphdfs/regression/input/regression/printLargeTable.py
-+++ b/gpAux/extensions/gphdfs/regression/input/regression/printLargeTable.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
- 
-diff --git a/gpAux/extensions/gphdfs/regression/integrate/create_data.py 
b/gpAux/extensions/gphdfs/regression/integrate/create_data.py
-index cb383df38b..8b3e80a760 100644
---- a/gpAux/extensions/gphdfs/regression/integrate/create_data.py
-+++ b/gpAux/extensions/gphdfs/regression/integrate/create_data.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
- 
-diff --git a/gpAux/extensions/gphdfs/regression/legacy/lib/create_data.py 
b/gpAux/extensions/gphdfs/regression/legacy/lib/create_data.py
-index cb383df38b..8b3e80a760 100644
---- a/gpAux/extensions/gphdfs/regression/legacy/lib/create_data.py
-+++ b/gpAux/extensions/gphdfs/regression/legacy/lib/create_data.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
- 
-diff --git a/gpAux/gpperfmon/src/gpmon/gpperfmon_install 
b/gpAux/gpperfmon/src/gpmon/gpperfmon_install
-index 908ed49cb0..7d9754fe9d 100755
---- a/gpAux/gpperfmon/src/gpmon/gpperfmon_install
-+++ b/gpAux/gpperfmon/src/gpmon/gpperfmon_install
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- '''
- USAGE:   gpperfmon_install --port GPDB_PORT [--enable --password 
GPMON_PASSWORD] [--pgpass PATH_TO_FILE] [--gpperfmonport GPPERFMON_PORT] 
[--verbose]
-diff --git a/gpMgmt/bin/Makefile b/gpMgmt/bin/Makefile
-index d0330c6cac..a81950c072 100644
---- a/gpMgmt/bin/Makefile
-+++ b/gpMgmt/bin/Makefile
-@@ -29,7 +29,7 @@ LIB_DIR=$(SRC)/lib
- PYLIB_DIR=$(SRC)/ext
- 
- core: pygresql subprocess32
--      python gpconfig_modules/parse_guc_metadata.py $(prefix)
-+      python2 gpconfig_modules/parse_guc_metadata.py $(prefix)
- 
- ifneq "$(wildcard $(CURDIR)/pythonSrc/ext/*.tar.gz)" ""
- install: core lockfile paramiko ecdsa pycrypto stream psutil
-@@ -64,7 +64,7 @@ pygresql:
-       elif [ "$(BLD_ARCH)" = 'aix7_ppc_64' ]; then \
-           cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" 
python_64 setup.py build; \
-       else \
--          cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" 
LDFLAGS='$(LDFLAGS) $(PYGRESQL_LDFLAGS)' python setup.py build; \
-+          cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && DESTDIR="$(DESTDIR)" CC="$(CC)" 
LDFLAGS='$(LDFLAGS) $(PYGRESQL_LDFLAGS)' python2 setup.py build; \
-       fi
-       mkdir -p $(PYLIB_DIR)/pygresql
-       if [ `uname -s` = 'Darwin' ]; then \
-@@ -84,7 +84,7 @@ PARAMIKO_DIR=paramiko-$(PARAMIKO_VERSION)
- paramiko:
-       @echo "--- paramiko"
-       cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(PARAMIKO_DIR).tar.gz
--      cd $(PYLIB_SRC_EXT)/$(PARAMIKO_DIR)/ && python setup.py build
-+      cd $(PYLIB_SRC_EXT)/$(PARAMIKO_DIR)/ && python2 setup.py build
-       cp -r $(PYLIB_SRC_EXT)/$(PARAMIKO_DIR)/build/lib*/paramiko $(PYLIB_DIR)/
- 
- #
-@@ -95,7 +95,7 @@ ECDSA_DIR=ecdsa-$(ECDSA_VERSION)
- ecdsa:
-       @echo "--- ecdsa"
-       cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(ECDSA_DIR).tar.gz
--      cd $(PYLIB_SRC_EXT)/$(ECDSA_DIR)/ && python setup.py build
-+      cd $(PYLIB_SRC_EXT)/$(ECDSA_DIR)/ && python2 setup.py build
-       cp -r $(PYLIB_SRC_EXT)/$(ECDSA_DIR)/build/lib*/ecdsa $(PYLIB_DIR)/
- 
- #
-@@ -112,7 +112,7 @@ LOCKFILE_DST=$(PYLIB_DIR)/lockfile
- lockfile:
-       @echo "--- lockfile"
-       cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(LOCKFILE_DIR).tar.gz
--      cd $(PYLIB_SRC_EXT)/$(LOCKFILE_DIR)/ && python setup.py build
-+      cd $(PYLIB_SRC_EXT)/$(LOCKFILE_DIR)/ && python2 setup.py build
-       mkdir -p $(LOCKFILE_DST)
-       awk 'BEGIN{print "# pylint: disable-all"} /^if hasattr/ {exit} { print 
}' < `echo $(LOCKFILE_SRC)/__init__.py`    > $(LOCKFILE_DST)/__init__.py
-       awk 'BEGIN{print "# pylint: disable-all"} { print }'                    
  < `echo $(LOCKFILE_SRC)/pidlockfile.py` > $(LOCKFILE_DST)/pidlockfile.py
-@@ -120,7 +120,7 @@ lockfile:
- subprocess32:
-       @echo "--- subprocess32, Linux only"
-       @if [ `uname -s` = 'Linux' ]; then \
--                cd $(PYLIB_SRC)/subprocess32 && CC="$(CC)" python setup.py 
build; \
-+                cd $(PYLIB_SRC)/subprocess32 && CC="$(CC)" python2 setup.py 
build; \
-                 cp -f $(PYLIB_SRC)/subprocess32/build/lib.*/* $(PYLIB_DIR)/;  
\
-                 cp -f $(PYLIB_SRC)/subprocess32/ChangeLog 
$(PYLIB_DIR)/subprocess32-ChangeLog;  \
-         fi
-@@ -187,7 +187,7 @@ SETUP_TOOLS_DIR=setuptools-$(SETUP_TOOLS_VERSION)
- PARSE_DIR=parse-$(PARSE_VERSION)
- ARG_PARSE_DIR=argparse-$(ARG_PARSE_VERSION)
- PYTHONSRC_INSTALL=$(PYLIB_SRC_EXT)/install
--PYTHON_VERSION=$(shell python -c "import sys; print '%s.%s' % 
(sys.version_info[0:2])")
-+PYTHON_VERSION=$(shell python2 -c "import sys; print '%s.%s' % 
(sys.version_info[0:2])")
- 
PYTHONSRC_INSTALL_SITE=$(PYLIB_SRC_EXT)/install/lib/python$(PYTHON_VERSION)/site-packages
- PYTHONSRC_INSTALL_PYTHON_PATH=$(PYTHONPATH):$(PYTHONSRC_INSTALL_SITE)
- BEHAVE_BIN=$(PYTHONSRC_INSTALL)/bin/behave
-@@ -200,9 +200,9 @@ pylint:
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(PYLINT_DIR).tar.gz
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(LOGILAB_ASTNG_DIR).tar.gz
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(LOGILAB_COMMON_DIR).tar.gz
--      @cd $(PYLIB_SRC_EXT)/$(PYLINT_DIR)/ && python setup.py build 1> 
/dev/null
--      @cd $(PYLIB_SRC_EXT)/$(LOGILAB_ASTNG_DIR)/ && python setup.py build 1> 
/dev/null
--      @cd $(PYLIB_SRC_EXT)/$(LOGILAB_COMMON_DIR)/ && python setup.py build 1> 
/dev/null
-+      @cd $(PYLIB_SRC_EXT)/$(PYLINT_DIR)/ && python2 setup.py build 1> 
/dev/null
-+      @cd $(PYLIB_SRC_EXT)/$(LOGILAB_ASTNG_DIR)/ && python2 setup.py build 1> 
/dev/null
-+      @cd $(PYLIB_SRC_EXT)/$(LOGILAB_COMMON_DIR)/ && python2 setup.py build 
1> /dev/null
-       @cp -r $(PYLIB_SRC_EXT)/$(LOGILAB_COMMON_DIR)/build/lib/logilab 
$(PYLIB_SRC_EXT)/$(PYLINT_DIR)/build/lib/
-       @cp -r $(PYLIB_SRC_EXT)/$(LOGILAB_ASTNG_DIR)/build/lib/logilab 
$(PYLIB_SRC_EXT)/$(PYLINT_DIR)/build/lib/
-       @touch $(PYLIB_SRC_EXT)/$(PYLINT_DIR)/build/lib/__init__.py
-@@ -216,7 +216,7 @@ $(MOCK_BIN):
-        mkdir -p $(PYTHONSRC_INSTALL_SITE) && \
-          cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(MOCK_DIR).tar.gz && \
-          cd $(PYLIB_SRC_EXT)/$(MOCK_DIR)/ && \
--         PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install 
--prefix $(PYTHONSRC_INSTALL) ; \
-+         PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python2 setup.py install 
--prefix $(PYTHONSRC_INSTALL) ; \
-        fi;
- 
- #
-@@ -230,14 +230,14 @@ $(BEHAVE_BIN):
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(SETUP_TOOLS_DIR).tar.gz
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(PARSE_DIR).tar.gz
-       @cd $(PYLIB_SRC_EXT)/ && $(TAR) xzf $(ARG_PARSE_DIR).tar.gz
--      @cd $(PYLIB_SRC_EXT)/$(SETUP_TOOLS_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix 
$(PYTHONSRC_INSTALL)
--      @cd $(PYLIB_SRC_EXT)/$(PARSE_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix 
$(PYTHONSRC_INSTALL)
--      @cd $(PYLIB_SRC_EXT)/$(ARG_PARSE_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix 
$(PYTHONSRC_INSTALL)
-+      @cd $(PYLIB_SRC_EXT)/$(SETUP_TOOLS_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python2 setup.py install --prefix 
$(PYTHONSRC_INSTALL)
-+      @cd $(PYLIB_SRC_EXT)/$(PARSE_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python2 setup.py install --prefix 
$(PYTHONSRC_INSTALL)
-+      @cd $(PYLIB_SRC_EXT)/$(ARG_PARSE_DIR)/ && 
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python2 setup.py install --prefix 
$(PYTHONSRC_INSTALL)
-       # We're forcing a change in the requirements since we're in python
-       # 2.7.12. There's a new syntax in the python requirements for
-       # parse_type 0.4.2 which breaks if you're under 2.7.13
-       @cd $(PYLIB_SRC_EXT)/$(BEHAVE_DIR)/ && sed -i 
's/parse_type>=0.3.4/parse_type==0.4.1/' setup.py \
--              && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py 
install --prefix $(PYTHONSRC_INSTALL)
-+              && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python2 setup.py 
install --prefix $(PYTHONSRC_INSTALL)
-       @echo "--- behave done"
- 
- PYTHON_FILES=`grep -l --exclude=Makefile --exclude=gplogfilter "/bin/env 
python" *`\
-@@ -265,7 +265,7 @@ check: $(MOCK_BIN)
- 
- unitdevel:
-       @echo "Running pure unit tests..."
--      python -m unittest discover --verbose -s $(SRC)/gppylib -p 
"test_unit*.py"
-+      python2 -m unittest discover --verbose -s $(SRC)/gppylib -p 
"test_unit*.py"
- 
- solarisTest:
-       @if [ `uname -s` = 'SunOS' ]; then \
-diff --git a/gpMgmt/bin/analyzedb b/gpMgmt/bin/analyzedb
-index e34bf90cf2..c6e8809663 100755
---- a/gpMgmt/bin/analyzedb
-+++ b/gpMgmt/bin/analyzedb
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- 
- # Copyright (c) 2015 Pivotal Software, Inc. All Rights Reserved
-diff --git a/gpMgmt/bin/gp_df b/gpMgmt/bin/gp_df
-index 555a51c597..b2714b8f83 100755
---- a/gpMgmt/bin/gp_df
-+++ b/gpMgmt/bin/gp_df
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- '''
- USAGE: gp_df [-m]
-diff --git a/gpMgmt/bin/gpactivatestandby b/gpMgmt/bin/gpactivatestandby
-index 01d4d9503a..929a43c332 100755
---- a/gpMgmt/bin/gpactivatestandby
-+++ b/gpMgmt/bin/gpactivatestandby
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
-diff --git a/gpMgmt/bin/gpaddmirrors b/gpMgmt/bin/gpaddmirrors
-index a7c368071e..1f4e7665c6 100755
---- a/gpMgmt/bin/gpaddmirrors
-+++ b/gpMgmt/bin/gpaddmirrors
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Recovers Greenplum segment instances that are marked as invalid, if
- # mirroring is configured and operational
-diff --git a/gpMgmt/bin/gpcheck b/gpMgmt/bin/gpcheck
-index 09addfe769..a5dec9c929 100755
---- a/gpMgmt/bin/gpcheck
-+++ b/gpMgmt/bin/gpcheck
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
- 
-diff --git a/gpMgmt/bin/gpcheckcat b/gpMgmt/bin/gpcheckcat
-index 4d14de609c..cddd4bc5aa 100755
---- a/gpMgmt/bin/gpcheckcat
-+++ b/gpMgmt/bin/gpcheckcat
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- Usage: gpcheckcat [<option>] [dbname]
- 
-diff --git a/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py 
b/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
-index 04e07406aa..da9d0a49d5 100644
---- a/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
-+++ b/gpMgmt/bin/gpcheckcat_modules/foreign_key_check.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- from gppylib.gplog import *
- from gppylib.gpcatalog import *
-diff --git a/gpMgmt/bin/gpcheckcat_modules/repair.py 
b/gpMgmt/bin/gpcheckcat_modules/repair.py
-index 905f2b6083..b9c1d43450 100644
---- a/gpMgmt/bin/gpcheckcat_modules/repair.py
-+++ b/gpMgmt/bin/gpcheckcat_modules/repair.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Purpose : Creates the repair dir and the corresponding sql/bash scripts for
-           repairing some of the catalog issues(see the list below) reported 
by gpcheckcat.
-diff --git a/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py 
b/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
-index f6ea0d61dc..7bd89426f5 100644
---- a/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
-+++ b/gpMgmt/bin/gpcheckcat_modules/repair_missing_extraneous.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- from gppylib.operations.backup_utils import escapeDoubleQuoteInSQLString
- 
- 
-diff --git a/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py 
b/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
-index 8bf847a839..e385eaca5f 100644
---- a/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
-+++ b/gpMgmt/bin/gpcheckcat_modules/unique_index_violation_check.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- class UniqueIndexViolationCheck:
-     unique_indexes_query = """
-diff --git a/gpMgmt/bin/gpcheckperf b/gpMgmt/bin/gpcheckperf
-index ea2eeeb526..c4382d9fff 100755
---- a/gpMgmt/bin/gpcheckperf
-+++ b/gpMgmt/bin/gpcheckperf
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- gpcheckperf -- Check the hardware for Greenplum Database
- 
-diff --git a/gpMgmt/bin/gpcheckresgroupimpl b/gpMgmt/bin/gpcheckresgroupimpl
-index 02d9d8d2d0..1897b3aaaf 100755
---- a/gpMgmt/bin/gpcheckresgroupimpl
-+++ b/gpMgmt/bin/gpcheckresgroupimpl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2017, Pivotal Software Inc.
- #
-diff --git a/gpMgmt/bin/gpchecksubnetcfg b/gpMgmt/bin/gpchecksubnetcfg
-index 0f40044841..f60d5b28eb 100755
---- a/gpMgmt/bin/gpchecksubnetcfg
-+++ b/gpMgmt/bin/gpchecksubnetcfg
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
-diff --git a/gpMgmt/bin/gpconfig b/gpMgmt/bin/gpconfig
-index 7c39ba87cf..34d47995f6 100755
---- a/gpMgmt/bin/gpconfig
-+++ b/gpMgmt/bin/gpconfig
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- 
-diff --git a/gpMgmt/bin/gpcrondump b/gpMgmt/bin/gpcrondump
-index 545c8d1ce7..bfdb3a7ca5 100755
---- a/gpMgmt/bin/gpcrondump
-+++ b/gpMgmt/bin/gpcrondump
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gpdbrestore b/gpMgmt/bin/gpdbrestore
-index 5d74245faa..4b962669cf 100755
---- a/gpMgmt/bin/gpdbrestore
-+++ b/gpMgmt/bin/gpdbrestore
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gpdeletesystem b/gpMgmt/bin/gpdeletesystem
-index 24b1a7a9bc..e95765fb39 100755
---- a/gpMgmt/bin/gpdeletesystem
-+++ b/gpMgmt/bin/gpdeletesystem
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
-diff --git a/gpMgmt/bin/gpexpand b/gpMgmt/bin/gpexpand
-index 52c2944f9b..b0dc1bd49f 100755
---- a/gpMgmt/bin/gpexpand
-+++ b/gpMgmt/bin/gpexpand
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long            - pylint: disable=C0301
- # Invalid name             - pylint: disable=C0103
- #
-diff --git a/gpMgmt/bin/gpfaultinjector b/gpMgmt/bin/gpfaultinjector
-index afb7cdab59..cdcb7c2029 100755
---- a/gpMgmt/bin/gpfaultinjector
-+++ b/gpMgmt/bin/gpfaultinjector
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gpfilespace b/gpMgmt/bin/gpfilespace
-index 53b4c63b15..c130cc6baf 100755
---- a/gpMgmt/bin/gpfilespace
-+++ b/gpMgmt/bin/gpfilespace
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- '''
-   gpfilespace [options]
-diff --git a/gpMgmt/bin/gpgenfsmap.py b/gpMgmt/bin/gpgenfsmap.py
-index 0c40d3e4e0..04ad0657b1 100755
---- a/gpMgmt/bin/gpgenfsmap.py
-+++ b/gpMgmt/bin/gpgenfsmap.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2011. All Rights Reserved.
- '''
-diff --git a/gpMgmt/bin/gpinitstandby b/gpMgmt/bin/gpinitstandby
-index 179dc40b2a..543fe0fb51 100755
---- a/gpMgmt/bin/gpinitstandby
-+++ b/gpMgmt/bin/gpinitstandby
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
-diff --git a/gpMgmt/bin/gpload.py b/gpMgmt/bin/gpload.py
-index f07be89738..8ecf4c8515 100755
---- a/gpMgmt/bin/gpload.py
-+++ b/gpMgmt/bin/gpload.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- # gpload - load file(s) into Greenplum Database
- # Copyright Greenplum 2008
-diff --git a/gpMgmt/bin/gpload_test/gpload/TEST.py 
b/gpMgmt/bin/gpload_test/gpload/TEST.py
-index 7a88f54ffd..71449680d9 100755
---- a/gpMgmt/bin/gpload_test/gpload/TEST.py
-+++ b/gpMgmt/bin/gpload_test/gpload/TEST.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- import sys
-diff --git a/gpMgmt/bin/gpload_test/gpload2/TEST.py 
b/gpMgmt/bin/gpload_test/gpload2/TEST.py
-index d3acdc8728..5822b6eef2 100755
---- a/gpMgmt/bin/gpload_test/gpload2/TEST.py
-+++ b/gpMgmt/bin/gpload_test/gpload2/TEST.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- import sys
-diff --git a/gpMgmt/bin/gpload_test/gpload2/TEST_REMOTE.py 
b/gpMgmt/bin/gpload_test/gpload2/TEST_REMOTE.py
-index eda65daf64..0129efd9ce 100755
---- a/gpMgmt/bin/gpload_test/gpload2/TEST_REMOTE.py
-+++ b/gpMgmt/bin/gpload_test/gpload2/TEST_REMOTE.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- import sys
-diff --git a/gpMgmt/bin/gplogfilter b/gpMgmt/bin/gplogfilter
-index 09f36cf2f1..abd086283e 100755
---- a/gpMgmt/bin/gplogfilter
-+++ b/gpMgmt/bin/gplogfilter
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- #
- # gplogfilter [options] [inputfile]...
-diff --git a/gpMgmt/bin/gpmfr.py b/gpMgmt/bin/gpmfr.py
-index 2c3dcc4789..04a2849c6d 100755
---- a/gpMgmt/bin/gpmfr.py
-+++ b/gpMgmt/bin/gpmfr.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2013. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gpmovemirrors b/gpMgmt/bin/gpmovemirrors
-index daaf596fef..bbf8f69477 100755
---- a/gpMgmt/bin/gpmovemirrors
-+++ b/gpMgmt/bin/gpmovemirrors
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long            - pylint: disable=C0301
- # Invalid name             - pylint: disable=C0103
- #
-diff --git a/gpMgmt/bin/gppkg b/gpMgmt/bin/gppkg
-index 24a09b2dae..4794129283 100755
---- a/gpMgmt/bin/gppkg
-+++ b/gpMgmt/bin/gppkg
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python 
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/commands/base.py 
b/gpMgmt/bin/gppylib/commands/base.py
-index fe6f3720bb..cc8e13ca3b 100755
---- a/gpMgmt/bin/gppylib/commands/base.py
-+++ b/gpMgmt/bin/gppylib/commands/base.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/commands/dca.py 
b/gpMgmt/bin/gppylib/commands/dca.py
-index 3bde8e3af8..64bb685d61 100644
---- a/gpMgmt/bin/gppylib/commands/dca.py
-+++ b/gpMgmt/bin/gppylib/commands/dca.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2011. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/commands/gp.py 
b/gpMgmt/bin/gppylib/commands/gp.py
-index 82ee2f687f..985b77ae33 100644
---- a/gpMgmt/bin/gppylib/commands/gp.py
-+++ b/gpMgmt/bin/gppylib/commands/gp.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/commands/pg.py 
b/gpMgmt/bin/gppylib/commands/pg.py
-index 2eb1392db1..cc8a6ee175 100644
---- a/gpMgmt/bin/gppylib/commands/pg.py
-+++ b/gpMgmt/bin/gppylib/commands/pg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/commands/test/regress/test_regress_pg.py 
b/gpMgmt/bin/gppylib/commands/test/regress/test_regress_pg.py
-index 22c0473ccf..a2dc1e1879 100755
---- a/gpMgmt/bin/gppylib/commands/test/regress/test_regress_pg.py
-+++ b/gpMgmt/bin/gppylib/commands/test/regress/test_regress_pg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py 
b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
-index a0ec1ad275..720c6d20c7 100644
---- a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
-+++ b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2012. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_gp.py 
b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_gp.py
-index 896d6b4a05..532e370daa 100644
---- a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_gp.py
-+++ b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_gp.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2012. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/commands/unix.py 
b/gpMgmt/bin/gppylib/commands/unix.py
-index 39fb8cfb27..75fd52acbd 100644
---- a/gpMgmt/bin/gppylib/commands/unix.py
-+++ b/gpMgmt/bin/gppylib/commands/unix.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/datetimeutils.py 
b/gpMgmt/bin/gppylib/datetimeutils.py
-index 94549eb92b..024875c8c1 100644
---- a/gpMgmt/bin/gppylib/datetimeutils.py
-+++ b/gpMgmt/bin/gppylib/datetimeutils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # $Id: $
- # $Change: $
- # $DateTime: $
-diff --git a/gpMgmt/bin/gppylib/db/catalog.py 
b/gpMgmt/bin/gppylib/db/catalog.py
-index 63e055d591..342ad2f392 100644
---- a/gpMgmt/bin/gppylib/db/catalog.py
-+++ b/gpMgmt/bin/gppylib/db/catalog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/db/dbconn.py b/gpMgmt/bin/gppylib/db/dbconn.py
-index 5e534f07b4..446025584f 100644
---- a/gpMgmt/bin/gppylib/db/dbconn.py
-+++ b/gpMgmt/bin/gppylib/db/dbconn.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/db/test/regress/test_regress_catalog.py 
b/gpMgmt/bin/gppylib/db/test/regress/test_regress_catalog.py
-index 9d9e7b08e2..d8c760cf48 100644
---- a/gpMgmt/bin/gppylib/db/test/regress/test_regress_catalog.py
-+++ b/gpMgmt/bin/gppylib/db/test/regress/test_regress_catalog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/db/test/test_catalog.py 
b/gpMgmt/bin/gppylib/db/test/test_catalog.py
-index 121244cf06..fe656cc594 100644
---- a/gpMgmt/bin/gppylib/db/test/test_catalog.py
-+++ b/gpMgmt/bin/gppylib/db/test/test_catalog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/db/test/test_dbconn.py 
b/gpMgmt/bin/gppylib/db/test/test_dbconn.py
-index 385ddb4e52..af61a5a81f 100755
---- a/gpMgmt/bin/gppylib/db/test/test_dbconn.py
-+++ b/gpMgmt/bin/gppylib/db/test/test_dbconn.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/db/test/unit/test_unit_dbconn.py 
b/gpMgmt/bin/gppylib/db/test/unit/test_unit_dbconn.py
-index 9c9d9e4a96..9c19565faf 100755
---- a/gpMgmt/bin/gppylib/db/test/unit/test_unit_dbconn.py
-+++ b/gpMgmt/bin/gppylib/db/test/unit/test_unit_dbconn.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/fault_injection.py 
b/gpMgmt/bin/gppylib/fault_injection.py
-index 756ac0ad0c..5df5776edc 100644
---- a/gpMgmt/bin/gppylib/fault_injection.py
-+++ b/gpMgmt/bin/gppylib/fault_injection.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- 
-diff --git a/gpMgmt/bin/gppylib/gp_dbid.py b/gpMgmt/bin/gppylib/gp_dbid.py
-index 29db66ee21..c6f07055fa 100644
---- a/gpMgmt/bin/gppylib/gp_dbid.py
-+++ b/gpMgmt/bin/gppylib/gp_dbid.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/gpMgmt/bin/gppylib/gp_era.py b/gpMgmt/bin/gppylib/gp_era.py
-index abd0c1acfa..c874990596 100644
---- a/gpMgmt/bin/gppylib/gp_era.py
-+++ b/gpMgmt/bin/gppylib/gp_era.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/gpMgmt/bin/gppylib/gparray.py b/gpMgmt/bin/gppylib/gparray.py
-index e0d3a4906a..a8311568fe 100755
---- a/gpMgmt/bin/gppylib/gparray.py
-+++ b/gpMgmt/bin/gppylib/gparray.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/gpcatalog.py b/gpMgmt/bin/gppylib/gpcatalog.py
-index 1d6ee74165..069b6cbb35 100644
---- a/gpMgmt/bin/gppylib/gpcatalog.py
-+++ b/gpMgmt/bin/gppylib/gpcatalog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2010-2011 EMC Corporation.  All Rights Reserved
- #
-diff --git a/gpMgmt/bin/gppylib/gpcheckutil.py 
b/gpMgmt/bin/gppylib/gpcheckutil.py
-index 0fc8188dec..ec9ce44245 100755
---- a/gpMgmt/bin/gppylib/gpcheckutil.py
-+++ b/gpMgmt/bin/gppylib/gpcheckutil.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- class HostType:
-     GPCHECK_HOSTTYPE_UNDEFINED  = 0
-diff --git a/gpMgmt/bin/gppylib/gphostcache.py 
b/gpMgmt/bin/gppylib/gphostcache.py
-index 6cffada8d0..d678ff9b56 100644
---- a/gpMgmt/bin/gppylib/gphostcache.py
-+++ b/gpMgmt/bin/gppylib/gphostcache.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/gplog.py b/gpMgmt/bin/gppylib/gplog.py
-index 4b0736ba50..4c6f02b098 100644
---- a/gpMgmt/bin/gppylib/gplog.py
-+++ b/gpMgmt/bin/gppylib/gplog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/gpparseopts.py 
b/gpMgmt/bin/gppylib/gpparseopts.py
-index b478cb2015..f07312312f 100644
---- a/gpMgmt/bin/gppylib/gpparseopts.py
-+++ b/gpMgmt/bin/gppylib/gpparseopts.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/gpresgroup.py 
b/gpMgmt/bin/gppylib/gpresgroup.py
-index c686aa558b..b72930fe47 100644
---- a/gpMgmt/bin/gppylib/gpresgroup.py
-+++ b/gpMgmt/bin/gppylib/gpresgroup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2017, Pivotal Software Inc.
- #
-diff --git a/gpMgmt/bin/gppylib/gpsubprocess.py 
b/gpMgmt/bin/gppylib/gpsubprocess.py
-index b39d096b6d..a5cd500436 100644
---- a/gpMgmt/bin/gppylib/gpsubprocess.py
-+++ b/gpMgmt/bin/gppylib/gpsubprocess.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/gpunit b/gpMgmt/bin/gppylib/gpunit
-index 4ea2e2ccea..4eb73706da 100755
---- a/gpMgmt/bin/gppylib/gpunit
-+++ b/gpMgmt/bin/gppylib/gpunit
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- gpunit is similar to unit2 in python but runs with our GpMgmtTestRunner and 
GpMgmtTextTestResult.
-diff --git a/gpMgmt/bin/gppylib/gpversion.py b/gpMgmt/bin/gppylib/gpversion.py
-index f63a6d0bcb..c0a777be81 100644
---- a/gpMgmt/bin/gppylib/gpversion.py
-+++ b/gpMgmt/bin/gppylib/gpversion.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/logfilter.py b/gpMgmt/bin/gppylib/logfilter.py
-index da5e1b0f31..997ece19ff 100644
---- a/gpMgmt/bin/gppylib/logfilter.py
-+++ b/gpMgmt/bin/gppylib/logfilter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # $Id: $
- # $Change: $
- # $DateTime: $
-diff --git a/gpMgmt/bin/gppylib/operations/deletesystem.py 
b/gpMgmt/bin/gppylib/operations/deletesystem.py
-index 921c92f7a5..4d6e925ef6 100644
---- a/gpMgmt/bin/gppylib/operations/deletesystem.py
-+++ b/gpMgmt/bin/gppylib/operations/deletesystem.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os 
- 
-diff --git a/gpMgmt/bin/gppylib/operations/initstandby.py 
b/gpMgmt/bin/gppylib/operations/initstandby.py
-index 56c373576a..27f7c3e100 100755
---- a/gpMgmt/bin/gppylib/operations/initstandby.py
-+++ b/gpMgmt/bin/gppylib/operations/initstandby.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import base64
-diff --git a/gpMgmt/bin/gppylib/operations/persistent_rebuild.py 
b/gpMgmt/bin/gppylib/operations/persistent_rebuild.py
-index cc22bb1fca..e28d87d1b7 100644
---- a/gpMgmt/bin/gppylib/operations/persistent_rebuild.py
-+++ b/gpMgmt/bin/gppylib/operations/persistent_rebuild.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- # Copyright (c) 2014 Pivotal Software, Inc. All Rights Reserved
- #
-diff --git a/gpMgmt/bin/gppylib/operations/reload.py 
b/gpMgmt/bin/gppylib/operations/reload.py
-index 55eaab1cef..0f5a6e6b11 100644
---- a/gpMgmt/bin/gppylib/operations/reload.py
-+++ b/gpMgmt/bin/gppylib/operations/reload.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import time
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_clean_gppkg.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_clean_gppkg.py
-index 8b881abaa4..53e3580535 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_clean_gppkg.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_clean_gppkg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- 
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_misc.py 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_misc.py
-index 1d9c933dd8..21b632d6af 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_misc.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_misc.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import shutil
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals.py
-index 32c515a500..be1e6c1284 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import tarfile
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals_on_standby.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals_on_standby.py
-index 02aecdf249..7b9908fe28 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals_on_standby.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_muck_with_internals_on_standby.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import tarfile
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_query.py 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_query.py
-index c59e374138..5be0a1acc1 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_query.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_query.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import tarfile
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_shared_dependencies.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_shared_dependencies.py
-index 71e36e9361..1ab08797c5 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_shared_dependencies.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_shared_dependencies.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- 
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py
-index 44154e5bf1..cd309159f5 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- 
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_negative.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_negative.py
-index d1667a21c8..13c7ef9f38 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_negative.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_negative.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os 
- import tarfile
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_single_dependencies.py
 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_single_dependencies.py
-index 7b3187aac3..9dd7a9ce5e 100755
---- 
a/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_single_dependencies.py
-+++ 
b/gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_single_dependencies.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- 
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/regress/test_regress_filespace.py 
b/gpMgmt/bin/gppylib/operations/test/regress/test_regress_filespace.py
-index b68c163644..be896c3d57 100644
---- a/gpMgmt/bin/gppylib/operations/test/regress/test_regress_filespace.py
-+++ b/gpMgmt/bin/gppylib/operations/test/regress/test_regress_filespace.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- 
-diff --git a/gpMgmt/bin/gppylib/operations/test/test_package.py 
b/gpMgmt/bin/gppylib/operations/test/test_package.py
-index 8014b593cf..39c67db5ea 100755
---- a/gpMgmt/bin/gppylib/operations/test/test_package.py
-+++ b/gpMgmt/bin/gppylib/operations/test/test_package.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import shutil
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py
-index 4b26cbbcf6..acfd8797eb 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2016. All Rights Reserved.
- #
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_buildMirrorSegments.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_buildMirrorSegments.py
-index ef61d71234..6d19b5da95 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_buildMirrorSegments.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_buildMirrorSegments.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_deletesystem.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_deletesystem.py
-index a79172c118..4ab958350c 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_deletesystem.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_deletesystem.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- from gppylib.operations.deletesystem import validate_pgport
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_filespace.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_filespace.py
-index 78806edcad..69294ea0e6 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_filespace.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_filespace.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2012. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_initstandby.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_initstandby.py
-index e9468db2df..6d5d06cc6b 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_initstandby.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_initstandby.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import unittest
-diff --git 
a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_persistent_rebuild.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_persistent_rebuild.py
-index 87fef804df..2881bf43b3 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_persistent_rebuild.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_persistent_rebuild.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2014-Present Pivotal Software, Inc.
- #
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_reload.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_reload.py
-index cbe2494008..02972ce813 100644
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_reload.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_reload.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import unittest
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_restore.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_restore.py
-index 2844f0f44e..adb4bb474d 100755
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_restore.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_restore.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # coding: utf-8
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_unix.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_unix.py
-index b934e295b5..4066aee765 100755
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_unix.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_unix.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2014. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_utils.py 
b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_utils.py
-index fbf1d80793..0424acc7f3 100755
---- a/gpMgmt/bin/gppylib/operations/test/unit/test_unit_utils.py
-+++ b/gpMgmt/bin/gppylib/operations/test/unit/test_unit_utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/parseutils.py 
b/gpMgmt/bin/gppylib/parseutils.py
-index 49dfcbfefa..b4cf48eb58 100644
---- a/gpMgmt/bin/gppylib/parseutils.py
-+++ b/gpMgmt/bin/gppylib/parseutils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long            - pylint: disable=C0301
- # Invalid name             - pylint: disable=C0103
- 
-diff --git a/gpMgmt/bin/gppylib/pgconf.py b/gpMgmt/bin/gppylib/pgconf.py
-index 6f264e3cc9..5398c8383f 100644
---- a/gpMgmt/bin/gppylib/pgconf.py
-+++ b/gpMgmt/bin/gppylib/pgconf.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # $Id: $
- """
- postgresql.conf configuration file reader
-diff --git a/gpMgmt/bin/gppylib/programs/clsAddMirrors.py 
b/gpMgmt/bin/gppylib/programs/clsAddMirrors.py
-index d54b617773..1ee1719c27 100644
---- a/gpMgmt/bin/gppylib/programs/clsAddMirrors.py
-+++ b/gpMgmt/bin/gppylib/programs/clsAddMirrors.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long            - pylint: disable=C0301
- # Invalid name             - pylint: disable=C0103
- #
-diff --git a/gpMgmt/bin/gppylib/programs/clsInjectFault.py 
b/gpMgmt/bin/gppylib/programs/clsInjectFault.py
-index 8cae3ea4da..c4aeff2b6f 100644
---- a/gpMgmt/bin/gppylib/programs/clsInjectFault.py
-+++ b/gpMgmt/bin/gppylib/programs/clsInjectFault.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/programs/clsRecoverSegment.py 
b/gpMgmt/bin/gppylib/programs/clsRecoverSegment.py
-index fc19167936..dd13ca582a 100644
---- a/gpMgmt/bin/gppylib/programs/clsRecoverSegment.py
-+++ b/gpMgmt/bin/gppylib/programs/clsRecoverSegment.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long            - pylint: disable=C0301
- # Invalid name             - pylint: disable=C0103
- #
-diff --git a/gpMgmt/bin/gppylib/programs/clsSystemState.py 
b/gpMgmt/bin/gppylib/programs/clsSystemState.py
-index 26c4055e19..c9f52068c2 100644
---- a/gpMgmt/bin/gppylib/programs/clsSystemState.py
-+++ b/gpMgmt/bin/gppylib/programs/clsSystemState.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git 
a/gpMgmt/bin/gppylib/programs/test/unit/test_cluster_clsrecoversegment.py 
b/gpMgmt/bin/gppylib/programs/test/unit/test_cluster_clsrecoversegment.py
-index ce2f6706f6..3891419d0c 100644
---- a/gpMgmt/bin/gppylib/programs/test/unit/test_cluster_clsrecoversegment.py
-+++ b/gpMgmt/bin/gppylib/programs/test/unit/test_cluster_clsrecoversegment.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- from gparray import GpDB, GpArray, FAULT_STRATEGY_NONE
- from gppylib import gparray
-diff --git a/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py 
b/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
-index 7b07fdcb87..baae6b02a8 100755
---- a/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
-+++ b/gpMgmt/bin/gppylib/system/ComputeCatalogUpdate.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/gpMgmt/bin/gppylib/system/configurationImplGpdb.py 
b/gpMgmt/bin/gppylib/system/configurationImplGpdb.py
-index b37f42e0e3..7e865e26a9 100644
---- a/gpMgmt/bin/gppylib/system/configurationImplGpdb.py
-+++ b/gpMgmt/bin/gppylib/system/configurationImplGpdb.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- # Copyright (c) EMC/Greenplum Inc 2011. All Rights Reserved.
-diff --git a/gpMgmt/bin/gppylib/system/configurationImplTest.py 
b/gpMgmt/bin/gppylib/system/configurationImplTest.py
-index afdaac583c..7803b805ce 100644
---- a/gpMgmt/bin/gppylib/system/configurationImplTest.py
-+++ b/gpMgmt/bin/gppylib/system/configurationImplTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/configurationInterface.py 
b/gpMgmt/bin/gppylib/system/configurationInterface.py
-index 2532f46ea6..24aa442658 100644
---- a/gpMgmt/bin/gppylib/system/configurationInterface.py
-+++ b/gpMgmt/bin/gppylib/system/configurationInterface.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/environment.py 
b/gpMgmt/bin/gppylib/system/environment.py
-index a45ee884d7..da56d3a329 100644
---- a/gpMgmt/bin/gppylib/system/environment.py
-+++ b/gpMgmt/bin/gppylib/system/environment.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/fileSystemImplOs.py 
b/gpMgmt/bin/gppylib/system/fileSystemImplOs.py
-index 1f8b48e745..0f0b3713a2 100644
---- a/gpMgmt/bin/gppylib/system/fileSystemImplOs.py
-+++ b/gpMgmt/bin/gppylib/system/fileSystemImplOs.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/fileSystemImplTest.py 
b/gpMgmt/bin/gppylib/system/fileSystemImplTest.py
-index 0094f834be..d79449e804 100644
---- a/gpMgmt/bin/gppylib/system/fileSystemImplTest.py
-+++ b/gpMgmt/bin/gppylib/system/fileSystemImplTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/fileSystemInterface.py 
b/gpMgmt/bin/gppylib/system/fileSystemInterface.py
-index 6ad7bcca75..32acfc32f4 100644
---- a/gpMgmt/bin/gppylib/system/fileSystemInterface.py
-+++ b/gpMgmt/bin/gppylib/system/fileSystemInterface.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/info.py 
b/gpMgmt/bin/gppylib/system/info.py
-index a542d9e924..7145d78080 100644
---- a/gpMgmt/bin/gppylib/system/info.py
-+++ b/gpMgmt/bin/gppylib/system/info.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- import psutil
- import os
- import resource
-diff --git a/gpMgmt/bin/gppylib/system/osImplNative.py 
b/gpMgmt/bin/gppylib/system/osImplNative.py
-index 30def949b2..2a11d5f5bd 100644
---- a/gpMgmt/bin/gppylib/system/osImplNative.py
-+++ b/gpMgmt/bin/gppylib/system/osImplNative.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/osImplTest.py 
b/gpMgmt/bin/gppylib/system/osImplTest.py
-index c1c159ef16..e8b9a6d741 100644
---- a/gpMgmt/bin/gppylib/system/osImplTest.py
-+++ b/gpMgmt/bin/gppylib/system/osImplTest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/system/osInterface.py 
b/gpMgmt/bin/gppylib/system/osInterface.py
-index 17743ca773..9cd167c112 100644
---- a/gpMgmt/bin/gppylib/system/osInterface.py
-+++ b/gpMgmt/bin/gppylib/system/osInterface.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/test/regress/test_regress_gpexpand.py 
b/gpMgmt/bin/gppylib/test/regress/test_regress_gpexpand.py
-index 8a3df57a53..ce4bca726c 100644
---- a/gpMgmt/bin/gppylib/test/regress/test_regress_gpexpand.py
-+++ b/gpMgmt/bin/gppylib/test/regress/test_regress_gpexpand.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import unittest
- import os, socket
-diff --git a/gpMgmt/bin/gppylib/test/regress/test_regress_gpssh.py 
b/gpMgmt/bin/gppylib/test/regress/test_regress_gpssh.py
-index ecc8510022..a325215f8d 100755
---- a/gpMgmt/bin/gppylib/test/regress/test_regress_gpssh.py
-+++ b/gpMgmt/bin/gppylib/test/regress/test_regress_gpssh.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os, signal, time, re
- import unittest
-diff --git a/gpMgmt/bin/gppylib/test/regress/test_regress_pygresql.py 
b/gpMgmt/bin/gppylib/test/regress/test_regress_pygresql.py
-index b611ee4d2e..c9e4d8f4ac 100755
---- a/gpMgmt/bin/gppylib/test/regress/test_regress_pygresql.py
-+++ b/gpMgmt/bin/gppylib/test/regress/test_regress_pygresql.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcheckcat.py 
b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcheckcat.py
-index 2bca593732..ce3d1c748b 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcheckcat.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcheckcat.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import imp
- import os
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcrondump.py 
b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcrondump.py
-index cb8c083ef5..427aa2f241 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcrondump.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpcrondump.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import sys
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstart.py 
b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstart.py
-index 0d7ba70572..7c9b5e93ba 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstart.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstart.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os, sys
- import unittest
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstop.py 
b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstop.py
-index d9cde57840..1736975403 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstop.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_cluster_gpsegstop.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os, sys
- import unittest
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gparray.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gparray.py
-index 14cc2ac42f..15de18fd69 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gparray.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gparray.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- # Line too long - pylint: disable=C0301
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gpcheckresgroupimpl.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gpcheckresgroupimpl.py
-index e69b524cf6..e15ced9d2a 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gpcheckresgroupimpl.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gpcheckresgroupimpl.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2017, Pivotal Software Inc.
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gpdbrestore.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gpdbrestore.py
-index 20aad1e9e9..ada56c5402 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gpdbrestore.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gpdbrestore.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import sys
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gphostcachelookup.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gphostcachelookup.py
-index 81976645e8..8fd89c8565 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gphostcachelookup.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gphostcachelookup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2012. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gpload.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gpload.py
-index bae41e7864..d5f6484adc 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gpload.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gpload.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2013. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gplog.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gplog.py
-index ef2c487bf7..10f7d7acb3 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gplog.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gplog.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_filter.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_filter.py
-index c5e7c0d7cc..c9cd9864a7 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_filter.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_filter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # coding: utf-8
- 
- import os, sys
-diff --git 
a/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_post_data_filter.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_post_data_filter.py
-index 6cab6d3892..546ad9761c 100644
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_post_data_filter.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gprestore_post_data_filter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # coding: utf-8 
- 
- import os, sys
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_gpversion.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_gpversion.py
-index d9e112b63b..537e9e2421 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_gpversion.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_gpversion.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py 
b/gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
-index 6d1f39f924..ff040573ce 100755
---- a/gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
-+++ b/gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys, os, getpass
- import unittest
-diff --git a/gpMgmt/bin/gppylib/testold/programs/test_clsAddMirrors.py 
b/gpMgmt/bin/gppylib/testold/programs/test_clsAddMirrors.py
-index 80b15a0e9d..1de9954682 100755
---- a/gpMgmt/bin/gppylib/testold/programs/test_clsAddMirrors.py
-+++ b/gpMgmt/bin/gppylib/testold/programs/test_clsAddMirrors.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- #
- from gppylib.testold.testDriver import TestDriver
-diff --git a/gpMgmt/bin/gppylib/testold/programs/test_clsInjectFault.py 
b/gpMgmt/bin/gppylib/testold/programs/test_clsInjectFault.py
-index 70992e8dec..eb90d02f72 100755
---- a/gpMgmt/bin/gppylib/testold/programs/test_clsInjectFault.py
-+++ b/gpMgmt/bin/gppylib/testold/programs/test_clsInjectFault.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- #
- from gppylib.testold.testDriver import TestDriver
-diff --git a/gpMgmt/bin/gppylib/testold/programs/test_clsRecoverSegment.py 
b/gpMgmt/bin/gppylib/testold/programs/test_clsRecoverSegment.py
-index b8ea257cd0..7dfcc25bec 100755
---- a/gpMgmt/bin/gppylib/testold/programs/test_clsRecoverSegment.py
-+++ b/gpMgmt/bin/gppylib/testold/programs/test_clsRecoverSegment.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- #
- from gppylib.testold.testDriver import TestDriver
-diff --git a/gpMgmt/bin/gppylib/testold/programs/test_clsSystemState.py 
b/gpMgmt/bin/gppylib/testold/programs/test_clsSystemState.py
-index f0e6576842..ba43a52109 100755
---- a/gpMgmt/bin/gppylib/testold/programs/test_clsSystemState.py
-+++ b/gpMgmt/bin/gppylib/testold/programs/test_clsSystemState.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- #
- from gppylib.testold.testDriver import TestDriver
-diff --git a/gpMgmt/bin/gppylib/testold/testUtils.py 
b/gpMgmt/bin/gppylib/testold/testUtils.py
-index 4eda9c99f9..31eda43a15 100644
---- a/gpMgmt/bin/gppylib/testold/testUtils.py
-+++ b/gpMgmt/bin/gppylib/testold/testUtils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/unit2 b/gpMgmt/bin/gppylib/unit2
-index 08d1006a20..883ad3bf6a 100755
---- a/gpMgmt/bin/gppylib/unit2
-+++ b/gpMgmt/bin/gppylib/unit2
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- __unittest = True
- 
-diff --git a/gpMgmt/bin/gppylib/userinput.py b/gpMgmt/bin/gppylib/userinput.py
-index 9a98835c23..d00778a59b 100644
---- a/gpMgmt/bin/gppylib/userinput.py
-+++ b/gpMgmt/bin/gppylib/userinput.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/gppylib/util/gp_utils.py 
b/gpMgmt/bin/gppylib/util/gp_utils.py
-index 90ec48343c..3afd54c366 100644
---- a/gpMgmt/bin/gppylib/util/gp_utils.py
-+++ b/gpMgmt/bin/gppylib/util/gp_utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/util/ssh_utils.py 
b/gpMgmt/bin/gppylib/util/ssh_utils.py
-index 92fdfe5c81..998c98cfe5 100644
---- a/gpMgmt/bin/gppylib/util/ssh_utils.py
-+++ b/gpMgmt/bin/gppylib/util/ssh_utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gppylib/util/test/test_logging.py 
b/gpMgmt/bin/gppylib/util/test/test_logging.py
-index 5e88864f3b..d2b2ce8d09 100755
---- a/gpMgmt/bin/gppylib/util/test/test_logging.py
-+++ b/gpMgmt/bin/gppylib/util/test/test_logging.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- test script to provide gplog.feature (behave) test with logging samples.
-diff --git a/gpMgmt/bin/gppylib/util/test/unit/test_cluster_ssh_utils.py 
b/gpMgmt/bin/gppylib/util/test/unit/test_cluster_ssh_utils.py
-index 4a29d53ee1..48c8e90c9c 100644
---- a/gpMgmt/bin/gppylib/util/test/unit/test_cluster_ssh_utils.py
-+++ b/gpMgmt/bin/gppylib/util/test/unit/test_cluster_ssh_utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import mock
- import sys, os, pwd
-diff --git a/gpMgmt/bin/gprecoverseg b/gpMgmt/bin/gprecoverseg
-index 777852a0ba..7a3fbbf545 100755
---- a/gpMgmt/bin/gprecoverseg
-+++ b/gpMgmt/bin/gprecoverseg
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- gprecoverseg
- 
-diff --git a/gpMgmt/bin/gpreload b/gpMgmt/bin/gpreload
-index c2a5765255..cffc4a592d 100755
---- a/gpMgmt/bin/gpreload
-+++ b/gpMgmt/bin/gpreload
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- from gppylib.mainUtils import simple_main
- from gppylib.operations.reload import GpReload
-diff --git a/gpMgmt/bin/gprestore_filter.py b/gpMgmt/bin/gprestore_filter.py
-index 54d54c8a8b..908da848b7 100755
---- a/gpMgmt/bin/gprestore_filter.py
-+++ b/gpMgmt/bin/gprestore_filter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- from gppylib.gpparseopts import OptParser, OptChecker
- from gppylib.operations.backup_utils import split_fqn, 
checkAndRemoveEnclosingDoubleQuote, removeEscapingDoubleQuoteInSQLString,\
-diff --git a/gpMgmt/bin/gprestore_post_data_filter.py 
b/gpMgmt/bin/gprestore_post_data_filter.py
-index 84dd4e3c69..9018ae6b36 100755
---- a/gpMgmt/bin/gprestore_post_data_filter.py
-+++ b/gpMgmt/bin/gprestore_post_data_filter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- from gppylib.gpparseopts import OptParser, OptChecker
- from gppylib.operations.backup_utils import split_fqn, 
checkAndRemoveEnclosingDoubleQuote, removeEscapingDoubleQuoteInSQLString, \
-diff --git a/gpMgmt/bin/gpscp b/gpMgmt/bin/gpscp
-index 882139c82e..f43cddf0c7 100755
---- a/gpMgmt/bin/gpscp
-+++ b/gpMgmt/bin/gpscp
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- '''
- gpscp -- scp to multiple hosts at once
-diff --git a/gpMgmt/bin/gpsd b/gpMgmt/bin/gpsd
-index cec2c48e92..55a7d84e7c 100755
---- a/gpMgmt/bin/gpsd
-+++ b/gpMgmt/bin/gpsd
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Copyright (c) 2014 Pivotal inc.
- 
- 
-diff --git a/gpMgmt/bin/gpseginstall b/gpMgmt/bin/gpseginstall
-index bef86d52e3..50fc3a1dfb 100755
---- a/gpMgmt/bin/gpseginstall
-+++ b/gpMgmt/bin/gpseginstall
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- USAGE:   gpseginstall -f|--file HOSTFILE [-u|--user USER] [-g|--group GROUP] 
[-p|--password PASSWORD] [-c|--commands COMMAND_OPTIONS] [--verbose]
-          where HOSTFILE lists all the hosts to install the software on
-diff --git a/gpMgmt/bin/gpssh b/gpMgmt/bin/gpssh
-index fd8cab3ae0..ef0b81f532 100755
---- a/gpMgmt/bin/gpssh
-+++ b/gpMgmt/bin/gpssh
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- '''
- gpssh -- ssh access to multiple hosts at once
-diff --git a/gpMgmt/bin/gpssh-exkeys b/gpMgmt/bin/gpssh-exkeys
-index 71583d887c..cae3fa1d5d 100755
---- a/gpMgmt/bin/gpssh-exkeys
-+++ b/gpMgmt/bin/gpssh-exkeys
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- indent-tabs-mode: nil; tab-width:4 -*-
- # vim:set tabstop=4 expandtab:
- '''
-diff --git a/gpMgmt/bin/gpstart b/gpMgmt/bin/gpstart
-index 4ffee9876c..b6e1c237bf 100755
---- a/gpMgmt/bin/gpstart
-+++ b/gpMgmt/bin/gpstart
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gpstate b/gpMgmt/bin/gpstate
-index bbbf8c4383..d0f45d048e 100755
---- a/gpMgmt/bin/gpstate
-+++ b/gpMgmt/bin/gpstate
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Displays system status information
- #
-diff --git a/gpMgmt/bin/gpstop b/gpMgmt/bin/gpstop
-index caf6266c85..2a7e9ca947 100755
---- a/gpMgmt/bin/gpstop
-+++ b/gpMgmt/bin/gpstop
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/bin/gpsys1 b/gpMgmt/bin/gpsys1
-index 03cab7349f..1f93723e12 100755
---- a/gpMgmt/bin/gpsys1
-+++ b/gpMgmt/bin/gpsys1
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- gpsys1 -- print system info on a host
- 
-diff --git a/gpMgmt/bin/gptransfer b/gpMgmt/bin/gptransfer
-index b518a4111f..a876168c3d 100755
---- a/gpMgmt/bin/gptransfer
-+++ b/gpMgmt/bin/gptransfer
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- 
- # Builtin function use - pylint: disable=W0141
-diff --git a/gpMgmt/bin/lib/gpconfigurenewsegment 
b/gpMgmt/bin/lib/gpconfigurenewsegment
-index c29c70d1d4..b29201b78b 100755
---- a/gpMgmt/bin/lib/gpconfigurenewsegment
-+++ b/gpMgmt/bin/lib/gpconfigurenewsegment
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys
- import os
-diff --git a/gpMgmt/bin/lib/gphostcachelookup.py 
b/gpMgmt/bin/lib/gphostcachelookup.py
-index 52aa71c842..965ffbfbc6 100755
---- a/gpMgmt/bin/lib/gphostcachelookup.py
-+++ b/gpMgmt/bin/lib/gphostcachelookup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- gphostcachelookup.py -- look up the hostname for a list of interfaces
- 
-diff --git a/gpMgmt/bin/lib/gpinitsegment b/gpMgmt/bin/lib/gpinitsegment
-index e79c158ec5..e29ea7cb6d 100755
---- a/gpMgmt/bin/lib/gpinitsegment
-+++ b/gpMgmt/bin/lib/gpinitsegment
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python 
-+#!/usr/bin/env python2
- # 
==============================================================================
- '''
- Usage: gpinitsegment [options]
-diff --git a/gpMgmt/bin/lib/gplogextract.py b/gpMgmt/bin/lib/gplogextract.py
-index 7973828841..14d09d28c2 100755
---- a/gpMgmt/bin/lib/gplogextract.py
-+++ b/gpMgmt/bin/lib/gplogextract.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # -*- coding: utf-8 -*-
- '''
-   gplogextract.py [options] file ...
-diff --git a/gpMgmt/bin/lib/gppinggpfdist.py b/gpMgmt/bin/lib/gppinggpfdist.py
-index 419fdaad39..6ba80cb18b 100644
---- a/gpMgmt/bin/lib/gppinggpfdist.py
-+++ b/gpMgmt/bin/lib/gppinggpfdist.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys, httplib, getopt, socket
- 
-diff --git a/gpMgmt/bin/lib/gpstate.py b/gpMgmt/bin/lib/gpstate.py
-index 33d19e80fc..b9c64dc157 100755
---- a/gpMgmt/bin/lib/gpstate.py
-+++ b/gpMgmt/bin/lib/gpstate.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Recovers Greenplum segment instances that are marked as invalid, if
- # mirroring is configured and operational
-diff --git a/gpMgmt/bin/lib/gpsys.py b/gpMgmt/bin/lib/gpsys.py
-index 9f0bf3c88c..7eaa117925 100755
---- a/gpMgmt/bin/lib/gpsys.py
-+++ b/gpMgmt/bin/lib/gpsys.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- gpsys.py -- print system properties
- 
-diff --git a/gpMgmt/bin/lib/multidd b/gpMgmt/bin/lib/multidd
-index 17c7c54e20..45c027f3e3 100755
---- a/gpMgmt/bin/lib/multidd
-+++ b/gpMgmt/bin/lib/multidd
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- multidd - run multiple dd concurrently to determine disk throughput
- 
-diff --git a/gpMgmt/bin/lib/pysync.py b/gpMgmt/bin/lib/pysync.py
-index 63c9c8b984..edf592d889 100755
---- a/gpMgmt/bin/lib/pysync.py
-+++ b/gpMgmt/bin/lib/pysync.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os, sys
- 
-diff --git a/gpMgmt/bin/minirepro b/gpMgmt/bin/minirepro
-index eb1d722e75..ccef013bd5 100755
---- a/gpMgmt/bin/minirepro
-+++ b/gpMgmt/bin/minirepro
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- minirepro utility
- 
-diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pg.py 
b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pg.py
-index 53c666912c..a04d82c7e7 100644
---- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pg.py
-+++ b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # pg.py
- #
-diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pgdb.py 
b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pgdb.py
-index 4b4344c971..4649a45c78 100644
---- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pgdb.py
-+++ b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/pgdb.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # pgdb.py
- #
-diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/setup.py 
b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/setup.py
-index 0b65800908..a82377ef8e 100755
---- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/setup.py
-+++ b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/setup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # $Id: setup.py,v 1.27 2008/11/21 17:08:17 cito Exp $
- 
- """Setup script for PyGreSQL version 4.0
-diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/advanced.py 
b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/advanced.py
-index 41a5bc457a..fd414610c0 100755
---- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/advanced.py
-+++ b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/advanced.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- # advanced.py - demo of advanced features of PostGres. Some may not be ANSI.
- # inspired from the Postgres tutorial 
- # adapted to Python 1995 by Pascal Andre
-diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/basics.py 
b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/basics.py
-index 98a7f86a90..64a5cab993 100755
---- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/basics.py
-+++ b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/tutorial/basics.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- # basics.py - basic SQL commands tutorial
- # inspired from the Postgres95 tutorial 
- # adapted to Python 1995 by Pascal ANDRE
-diff --git a/gpMgmt/bin/pythonSrc/subprocess32/setup.py 
b/gpMgmt/bin/pythonSrc/subprocess32/setup.py
-index 07d9c374af..9498783fe2 100755
---- a/gpMgmt/bin/pythonSrc/subprocess32/setup.py
-+++ b/gpMgmt/bin/pythonSrc/subprocess32/setup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2
- 
- import sys
- from distutils.core import setup, Extension
-diff --git a/gpMgmt/bin/test_gpmfr.py b/gpMgmt/bin/test_gpmfr.py
-index c90d7678bc..7ed28244a0 100755
---- a/gpMgmt/bin/test_gpmfr.py
-+++ b/gpMgmt/bin/test_gpmfr.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2013. All Rights Reserved. 
- #
-diff --git a/gpMgmt/bin/throttlingD.py b/gpMgmt/bin/throttlingD.py
-index 403a13759b..ba408c7a00 100755
---- a/gpMgmt/bin/throttlingD.py
-+++ b/gpMgmt/bin/throttlingD.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import ConfigParser
- import os
-diff --git a/gpMgmt/sbin/gpaddconfig.py b/gpMgmt/sbin/gpaddconfig.py
-index 7c7ed98e79..e999337da6 100755
---- a/gpMgmt/sbin/gpaddconfig.py
-+++ b/gpMgmt/sbin/gpaddconfig.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2009. All Rights Reserved.
- #
-diff --git a/gpMgmt/sbin/gpchangeuserpassword 
b/gpMgmt/sbin/gpchangeuserpassword
-index 0279330613..8bd7f3e527 100755
---- a/gpMgmt/sbin/gpchangeuserpassword
-+++ b/gpMgmt/sbin/gpchangeuserpassword
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- ''' 
- USAGE:  gpchangeuserpassword --user USER --password PASSWORD
-         where USER is the user for whom the password is being changed
-diff --git a/gpMgmt/sbin/gpcheck_hostdump b/gpMgmt/sbin/gpcheck_hostdump
-index 0ea0c5ff32..64a9589ac9 100755
---- a/gpMgmt/sbin/gpcheck_hostdump
-+++ b/gpMgmt/sbin/gpcheck_hostdump
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- USAGE:   gpcheck_hostdump [--appliance] [--linux] [--solaris]
-          where --appliance will do a dump of appliance server
-diff --git a/gpMgmt/sbin/gpcleansegmentdir.py 
b/gpMgmt/sbin/gpcleansegmentdir.py
-index 86c98a88e2..00d28e2888 100755
---- a/gpMgmt/sbin/gpcleansegmentdir.py
-+++ b/gpMgmt/sbin/gpcleansegmentdir.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/sbin/gpfixuserlimts b/gpMgmt/sbin/gpfixuserlimts
-index c2866b3e34..aaa5e274de 100755
---- a/gpMgmt/sbin/gpfixuserlimts
-+++ b/gpMgmt/sbin/gpfixuserlimts
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- ''' 
- USAGE:  gpfixuserlimts -f|--file FILE -u|--user USER
-         where FILE is the file to be modified
-diff --git a/gpMgmt/sbin/gpgetstatususingtransition.py 
b/gpMgmt/sbin/gpgetstatususingtransition.py
-index 7f638f9f79..e916a50925 100755
---- a/gpMgmt/sbin/gpgetstatususingtransition.py
-+++ b/gpMgmt/sbin/gpgetstatususingtransition.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
- #
-diff --git a/gpMgmt/sbin/gpoperation.py b/gpMgmt/sbin/gpoperation.py
-index 2383a807b2..639e2ed1ed 100755
---- a/gpMgmt/sbin/gpoperation.py
-+++ b/gpMgmt/sbin/gpoperation.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- import pickle
- import traceback
-diff --git a/gpMgmt/sbin/gppersistent_backup.py 
b/gpMgmt/sbin/gppersistent_backup.py
-index e78355a3db..8c0021ad7e 100755
---- a/gpMgmt/sbin/gppersistent_backup.py
-+++ b/gpMgmt/sbin/gppersistent_backup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) 2014-Present Pivotal Software, Inc.
- #
-diff --git a/gpMgmt/sbin/gppersistentrebuild b/gpMgmt/sbin/gppersistentrebuild
-index 25fd0cd66d..98da202504 100755
---- a/gpMgmt/sbin/gppersistentrebuild
-+++ b/gpMgmt/sbin/gppersistentrebuild
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- # Copyright (c) 2014 Pivotal Software, Inc. All Rights Reserved
- #
-diff --git a/gpMgmt/sbin/gprepairmirrorseg.py 
b/gpMgmt/sbin/gprepairmirrorseg.py
-index df73632870..71dc9be719 100755
---- a/gpMgmt/sbin/gprepairmirrorseg.py
-+++ b/gpMgmt/sbin/gprepairmirrorseg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2010. All Rights Reserved.
- #
-diff --git a/gpMgmt/sbin/gpsegstart.py b/gpMgmt/sbin/gpsegstart.py
-index b4ce5e9744..c0fe64ab6b 100755
---- a/gpMgmt/sbin/gpsegstart.py
-+++ b/gpMgmt/sbin/gpsegstart.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- #
-diff --git a/gpMgmt/sbin/gpsegstop.py b/gpMgmt/sbin/gpsegstop.py
-index 0fcd76cf3d..8dd9cab1b3 100755
---- a/gpMgmt/sbin/gpsegstop.py
-+++ b/gpMgmt/sbin/gpsegstop.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved.
- #
-diff --git a/gpMgmt/sbin/gpsegtoprimaryormirror.py 
b/gpMgmt/sbin/gpsegtoprimaryormirror.py
-index 821ad23756..793a1fbad3 100755
---- a/gpMgmt/sbin/gpsegtoprimaryormirror.py
-+++ b/gpMgmt/sbin/gpsegtoprimaryormirror.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright (c) Greenplum Inc 2008. All Rights Reserved. 
- #
-diff --git a/gpMgmt/sbin/gpsetdbid.py b/gpMgmt/sbin/gpsetdbid.py
-index 3c44a0e609..e488006e8d 100755
---- a/gpMgmt/sbin/gpsetdbid.py
-+++ b/gpMgmt/sbin/gpsetdbid.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- '''
- Copyright (c) Greenplum Inc 2010. All Rights Reserved. 
- 
-diff --git a/gpMgmt/sbin/packcore b/gpMgmt/sbin/packcore
-index 40325782fc..40f366d806 100755
---- a/gpMgmt/sbin/packcore
-+++ b/gpMgmt/sbin/packcore
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Copyright Pivotal 2014
- 
- 
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/data/pid_background_script.py 
b/gpMgmt/test/behave/mgmt_utils/steps/data/pid_background_script.py
-index 278df54451..bb2a918b9e 100644
---- a/gpMgmt/test/behave/mgmt_utils/steps/data/pid_background_script.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/data/pid_background_script.py
-@@ -1,4 +1,4 @@
-- #!/usr/bin/env python
-+ #!/usr/bin/env python2
- 
- import time
- import signal
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/ao_non_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/ao_non_part.py
-index c4d5d943ec..03cb4363a7 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/ao_non_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/ao_non_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- 
- if len(sys.argv) != 2:
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/co_non_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/co_non_part.py
-index 226b9d6e3a..31a7313832 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/co_non_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/co_non_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- 
- if len(sys.argv) != 2:
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_non_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_non_part.py
-index 925df360e0..f172ec40c8 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_non_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_non_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- 
- if len(sys.argv) != 3:
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_part.py
-index 709805f266..dc8e04b30d 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/dirty_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- import datetime
- 
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/heap_non_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/heap_non_part.py
-index aec87728eb..345d163b99 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/heap_non_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/heap_non_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- 
- if len(sys.argv) != 2:
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_data.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_data.py
-index 8b529b0e4f..87c6b55683 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_data.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_data.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- import datetime
- 
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_ddl.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_ddl.py
-index 18af979c19..9f0717fc1e 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_ddl.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/part_ddl.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- import datetime
- 
-diff --git a/gpMgmt/test/behave/mgmt_utils/steps/scripts/reference_non_part.py 
b/gpMgmt/test/behave/mgmt_utils/steps/scripts/reference_non_part.py
-index 9f58afffec..6c4c8429e4 100755
---- a/gpMgmt/test/behave/mgmt_utils/steps/scripts/reference_non_part.py
-+++ b/gpMgmt/test/behave/mgmt_utils/steps/scripts/reference_non_part.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import sys
- 
- NON_PART_ROW_COUNT = 10000
-diff --git a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_client.py 
b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_client.py
-index a65d9cb076..0b9f288bf6 100755
---- a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_client.py
-+++ b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_client.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import socket, time
- 
-diff --git a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_httpclient.py 
b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_httpclient.py
-index 5c1b89cfa9..e63f5ea3b9 100755
---- a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_httpclient.py
-+++ b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_httpclient.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys
- import os
-diff --git a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_specialrequest.py 
b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_specialrequest.py
-index 09cef81bda..f39d6950e5 100755
---- a/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_specialrequest.py
-+++ b/gpMgmt/test/behave_utils/gpfdist_utils/gpfdist_specialrequest.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- # This script will send whatever request body to gpfdist to test
- # gpfdist stability.
-diff --git a/gpMgmt/test/behave_utils/utils.py 
b/gpMgmt/test/behave_utils/utils.py
-index 66a0a893ac..3e0c6f9632 100644
---- a/gpMgmt/test/behave_utils/utils.py
-+++ b/gpMgmt/test/behave_utils/utils.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- import filecmp
- import fileinput
- import os
-diff --git a/gpMgmt/test/data/dump_pipe.py b/gpMgmt/test/data/dump_pipe.py
-index dbbc17838b..399a4e1079 100755
---- a/gpMgmt/test/data/dump_pipe.py
-+++ b/gpMgmt/test/data/dump_pipe.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import cPickle
-diff --git a/gpMgmt/test/data/restore_pipe.py 
b/gpMgmt/test/data/restore_pipe.py
-index a1eaef390e..001d854249 100755
---- a/gpMgmt/test/data/restore_pipe.py
-+++ b/gpMgmt/test/data/restore_pipe.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os
- import cPickle
-diff --git a/gpMgmt/test/parse_behave.py b/gpMgmt/test/parse_behave.py
-index 222f8f7966..dc1b83101c 100755
---- a/gpMgmt/test/parse_behave.py
-+++ b/gpMgmt/test/parse_behave.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import re, sys
- 
-diff --git a/src/backend/catalog/process_col_defaults.pl 
b/src/backend/catalog/process_col_defaults.pl
-index 675c9627ef..771a1fb1c4 100755
---- a/src/backend/catalog/process_col_defaults.pl
-+++ b/src/backend/catalog/process_col_defaults.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- #-------------------------------------------------------------------------
- #
- # process_col_defaults.pl
-diff --git a/src/backend/catalog/process_foreign_keys.pl 
b/src/backend/catalog/process_foreign_keys.pl
-index c66f5c9f63..9b3447386c 100755
---- a/src/backend/catalog/process_foreign_keys.pl
-+++ b/src/backend/catalog/process_foreign_keys.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- #-------------------------------------------------------------------------
- #
- # process_foreign_keys.pl
-diff --git a/src/backend/utils/Gen_fmgrtab.pl 
b/src/backend/utils/Gen_fmgrtab.pl
-index 34da810f7b..79f4f210a6 100644
---- a/src/backend/utils/Gen_fmgrtab.pl
-+++ b/src/backend/utils/Gen_fmgrtab.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- #-------------------------------------------------------------------------
- #
- # Gen_fmgrtab.pl
-diff --git a/src/backend/utils/error/pg_ltrace.c 
b/src/backend/utils/error/pg_ltrace.c
-index f9bfb49740..5f8b0fad9d 100644
---- a/src/backend/utils/error/pg_ltrace.c
-+++ b/src/backend/utils/error/pg_ltrace.c
-@@ -60,7 +60,7 @@ struct pg_trace_data_t
- 
- #if 0 
- ---------------------  BEGIN EXAMPLE STP ---------------------------------
--#! /usr/bin/env stap
-+#!/usr/bin/env stap
- 
- /* 
-  * Example stap.  The stp must be run as root because it uses embeded C.
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl 
b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
-index 8b9612f118..17ef281c78 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl 
b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
-index 222042a17a..bbce46b09c 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl 
b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
-index 2564b0cb73..1b34fa6c57 100644
---- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2007-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl 
b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
-index 2f6e63abe0..9fe4d28845 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl 
b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
-index f757793b94..5f08800234 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl 
b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
-index 6843488fc3..8c296a5caf 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl 
b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
-index 68dc87b498..30aca81f66 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright 2002 by Bill Huang
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl 
b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
-index a88d90e2b2..06401eab59 100644
---- a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2007-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl 
b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
-index 49757db10b..e5b370b198 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl 
b/src/backend/utils/mb/Unicode/UCS_to_most.pl
-index aadfa38149..a6f5a7f16a 100755
---- a/src/backend/utils/mb/Unicode/UCS_to_most.pl
-+++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- #
- # Copyright (c) 2001-2009, PostgreSQL Global Development Group
- #
-diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl
-index 495100326d..81e8d7d7b1 100755
---- a/src/bin/psql/create_help.pl
-+++ b/src/bin/psql/create_help.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- 
- #################################################################
- # create_help.pl -- converts SGML docs to internal psql help
-diff --git a/src/include/catalog/li_extras.py 
b/src/include/catalog/li_extras.py
-index 90fc10086e..16e953ea78 100755
---- a/src/include/catalog/li_extras.py
-+++ b/src/include/catalog/li_extras.py
-@@ -1,4 +1,4 @@
--#! /usr/local/bin/python
-+#!/usr/bin/python2
- 
- import sys
- import datetime
-diff --git a/src/test/locale/sort-test.pl b/src/test/locale/sort-test.pl
-index aedfa22c88..7f68c0bd17 100755
---- a/src/test/locale/sort-test.pl
-+++ b/src/test/locale/sort-test.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/bin/perl
- use locale;
- 
- open(INFILE, "<$ARGV[0]");
-diff --git a/src/test/locale/sort-test.py b/src/test/locale/sort-test.py
-index 1dafcedde5..f3f4a9328b 100755
---- a/src/test/locale/sort-test.py
-+++ b/src/test/locale/sort-test.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys, string, locale
- locale.setlocale(locale.LC_ALL, "")
-diff --git a/src/test/performance/parse_perf_results.py 
b/src/test/performance/parse_perf_results.py
-index fd2497e64c..6f13431582 100644
---- a/src/test/performance/parse_perf_results.py
-+++ b/src/test/performance/parse_perf_results.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- '''
- Parse the results of the performance test into a CSV for loading into
-diff --git a/src/test/regress/checkinc.py b/src/test/regress/checkinc.py
-index 8d8405b56a..f247cd2aaa 100755
---- a/src/test/regress/checkinc.py
-+++ b/src/test/regress/checkinc.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import sys, os, re, subprocess
- 
-diff --git a/src/test/regress/mem_quota_util.py 
b/src/test/regress/mem_quota_util.py
-index b4b029aec0..11773d5a2e 100755
---- a/src/test/regress/mem_quota_util.py
-+++ b/src/test/regress/mem_quota_util.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import os, sys
- 
-diff --git a/src/test/tinc/ext/unittest2/unit2 
b/src/test/tinc/ext/unittest2/unit2
-index 6d84985f36..01abd4f914 100755
---- a/src/test/tinc/ext/unittest2/unit2
-+++ b/src/test/tinc/ext/unittest2/unit2
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- __unittest = True
- 
-diff --git a/src/test/tinc/sbin/sync.py b/src/test/tinc/sbin/sync.py
-index 074aa868f2..812f752507 100755
---- a/src/test/tinc/sbin/sync.py
-+++ b/src/test/tinc/sbin/sync.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/sbin/tinc_check.py 
b/src/test/tinc/sbin/tinc_check.py
-index e231a2644c..4dd69c5eda 100755
---- a/src/test/tinc/sbin/tinc_check.py
-+++ b/src/test/tinc/sbin/tinc_check.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/sbin/tincmm.py b/src/test/tinc/sbin/tincmm.py
-index 7370788058..970031b6a0 100755
---- a/src/test/tinc/sbin/tincmm.py
-+++ b/src/test/tinc/sbin/tincmm.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tinc.py b/src/test/tinc/tinc.py
-index 5fbe727743..08b1452d5f 100755
---- a/src/test/tinc/tinc.py
-+++ b/src/test/tinc/tinc.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/pgcrypto/install/test_install.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/pgcrypto/install/test_install.py
-index 1b4ad99e9c..9ea95c610d 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/pgcrypto/install/test_install.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/pgcrypto/install/test_install.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/postgis/test_postgis.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/postgis/test_postgis.py
-index e07da3af01..99cb35530d 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/postgis/test_postgis.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/postgis/test_postgis.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/language/test_language.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/language/test_language.py
-index 2b279dd1f6..1efd744711 100644
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/language/test_language.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/language/test_language.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/__init__.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/__init__.py
-index 7ee8c88931..49376d386a 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/__init__.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/__init__.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/plpgsql_caching/functional/test_plpgsql.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/plpgsql_caching/functional/test_plpgsql.py
-index dfed6db8e9..993e89e437 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/plpgsql_caching/functional/test_plpgsql.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/procedural_language/plpgsql_caching/functional/test_plpgsql.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/system_catalog/guc_settings/TEST.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/system_catalog/guc_settings/TEST.py
-index 12dabc9514..ed64f2e1f0 100755
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/package/system_catalog/guc_settings/TEST.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/package/system_catalog/guc_settings/TEST.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/ao_memory.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/ao_memory.py
-index 7b4c616c92..e40405d873 100644
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/ao_memory.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/access_methods/ao_memory.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/partition/manual/TEST.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/partition/manual/TEST.py
-index 1f4b2fc916..13885406b3 100755
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/partition/manual/TEST.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/partition/manual/TEST.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/basebackup/test_xlog_cleanup.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/basebackup/test_xlog_cleanup.py
-index 7cb9f1ee89..92b2435098 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/basebackup/test_xlog_cleanup.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/basebackup/test_xlog_cleanup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0522.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0522.py
-index 1822238da8..7e19c20ac7 100755
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0522.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0522.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612-2.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612-2.py
-index 34a224933f..0475064b9f 100644
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612-2.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612-2.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612.py
-index 01b01011dc..8b72127188 100644
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0612.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0822.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0822.py
-index 473d6c9599..a2503152a1 100755
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0822.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/demo0822.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/regress/test_basic.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/regress/test_basic.py
-index da2fba68c7..26378f9a00 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/regress/test_basic.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/regress/test_basic.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/smart_shutdown/test_basic.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/smart_shutdown/test_basic.py
-index 50b61ee519..a9e0c03084 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/smart_shutdown/test_basic.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/smart_shutdown/test_basic.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
-index f7254891c7..baa8e8e889 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/walsender/test_negative.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/walsender/test_negative.py
-index be999da16b..ab7298097a 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/walsender/test_negative.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/walsender/test_negative.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/xact/test_basic.py 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/xact/test_basic.py
-index 85b3b4d02e..468e401041 100644
---- a/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/xact/test_basic.py
-+++ b/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/xact/test_basic.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpinitstandby/test_initstandby.py
 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpinitstandby/test_initstandby.py
-index b747ba112f..2099968da9 100644
---- 
a/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpinitstandby/test_initstandby.py
-+++ 
b/src/test/tinc/tincrepo/mpp/gpdb/tests/utilities/gpinitstandby/test_initstandby.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/lib/FileUtil.py 
b/src/test/tinc/tincrepo/mpp/lib/FileUtil.py
-index 14caba6528..e0328b7884 100644
---- a/src/test/tinc/tincrepo/mpp/lib/FileUtil.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/FileUtil.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/Globals.py 
b/src/test/tinc/tincrepo/mpp/lib/Globals.py
-index d95fbb620a..a88a4080d6 100644
---- a/src/test/tinc/tincrepo/mpp/lib/Globals.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/Globals.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/String.py 
b/src/test/tinc/tincrepo/mpp/lib/String.py
-index 34f375f7c3..3311a92f12 100644
---- a/src/test/tinc/tincrepo/mpp/lib/String.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/String.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/config.py 
b/src/test/tinc/tincrepo/mpp/lib/config.py
-index 0b58f7e624..e430d54dce 100644
---- a/src/test/tinc/tincrepo/mpp/lib/config.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/config.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/generalUtil.py 
b/src/test/tinc/tincrepo/mpp/lib/generalUtil.py
-index 03f32aeb3a..93079724a7 100644
---- a/src/test/tinc/tincrepo/mpp/lib/generalUtil.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/generalUtil.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpConfig.py 
b/src/test/tinc/tincrepo/mpp/lib/gpConfig.py
-index dc860417d9..70915f3a1e 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpConfig.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpConfig.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpSystem.py 
b/src/test/tinc/tincrepo/mpp/lib/gpSystem.py
-index 7d10c18c82..2b5ea8316c 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpSystem.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpSystem.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpUserRole.py 
b/src/test/tinc/tincrepo/mpp/lib/gpUserRole.py
-index b089adb676..e1b4287407 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpUserRole.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpUserRole.py
-@@ -1,4 +1,4 @@
--#!/usrbin/env python
-+#!/usrbin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gp_procedural_languages.py 
b/src/test/tinc/tincrepo/mpp/lib/gp_procedural_languages.py
-index f18c44daf8..1cbde8092f 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gp_procedural_languages.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gp_procedural_languages.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py 
b/src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
-index 0edbcf145b..baee42a25c 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpdbSegmentConfig.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpdbSystem.py 
b/src/test/tinc/tincrepo/mpp/lib/gpdbSystem.py
-index 8ab022ebca..66575d8e71 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpdbSystem.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpdbSystem.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- # Line too long - pylint: disable=C0301
- # Invalid name  - pylint: disable=C0103
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/gpfilespace.py 
b/src/test/tinc/tincrepo/mpp/lib/gpfilespace.py
-index f1abff5ccf..fdb45ffb1d 100644
---- a/src/test/tinc/tincrepo/mpp/lib/gpfilespace.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/gpfilespace.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/network.py 
b/src/test/tinc/tincrepo/mpp/lib/network.py
-index 191131a588..31be8b1383 100644
---- a/src/test/tinc/tincrepo/mpp/lib/network.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/network.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
- 
-diff --git a/src/test/tinc/tincrepo/mpp/lib/test/test_cluster_control.py 
b/src/test/tinc/tincrepo/mpp/lib/test/test_cluster_control.py
-index 1074fedd72..d17719effb 100644
---- a/src/test/tinc/tincrepo/mpp/lib/test/test_cluster_control.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/test/test_cluster_control.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/lib/test/test_gpconfig.py 
b/src/test/tinc/tincrepo/mpp/lib/test/test_gpconfig.py
-index 66367f70dc..2367c7e671 100644
---- a/src/test/tinc/tincrepo/mpp/lib/test/test_gpconfig.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/test/test_gpconfig.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/tinc/tincrepo/mpp/lib/test/test_gpdbSegmentConfig.py 
b/src/test/tinc/tincrepo/mpp/lib/test/test_gpdbSegmentConfig.py
-index d2497ea78a..93259b50ec 100644
---- a/src/test/tinc/tincrepo/mpp/lib/test/test_gpdbSegmentConfig.py
-+++ b/src/test/tinc/tincrepo/mpp/lib/test/test_gpdbSegmentConfig.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/env python2
- 
- """
- Copyright (c) 2004-Present Pivotal Software, Inc.
-diff --git a/src/test/unit/mock/mocker.py b/src/test/unit/mock/mocker.py
-index cf3c2c3de2..a0f145dffd 100755
---- a/src/test/unit/mock/mocker.py
-+++ b/src/test/unit/mock/mocker.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- 
- import logging
- import optparse
-diff --git a/src/tools/pginclude/pgcheckdefines 
b/src/tools/pginclude/pgcheckdefines
-index 2936caf2e0..102398fbae 100755
---- a/src/tools/pginclude/pgcheckdefines
-+++ b/src/tools/pginclude/pgcheckdefines
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- 
- #
- # This script looks for symbols that are referenced in #ifdef or defined()
-diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl
-index b9be30f63b..8106cfd4ba 100644
---- a/src/tools/version_stamp.pl
-+++ b/src/tools/version_stamp.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl -w
-+#!/usr/bin/perl -w
- 
- #################################################################
- # version_stamp.pl -- update version stamps throughout the source tree
diff --git 
a/bigtop-packages/src/common/gpdb/patch2-fix-deprecated-first-element-index-in-perl.diff
 
b/bigtop-packages/src/common/gpdb/patch2-fix-deprecated-first-element-index-in-perl.diff
deleted file mode 100644
index 189938072..000000000
--- 
a/bigtop-packages/src/common/gpdb/patch2-fix-deprecated-first-element-index-in-perl.diff
+++ /dev/null
@@ -1,106 +0,0 @@
-diff --git a/src/interfaces/ecpg/preproc/parse.pl 
b/src/interfaces/ecpg/preproc/parse.pl
-index f694484bea..61d289eed1 100644
---- a/src/interfaces/ecpg/preproc/parse.pl
-+++ b/src/interfaces/ecpg/preproc/parse.pl
-@@ -18,7 +18,7 @@ if (@ARGV) {
- 
- if ($path eq '') { $path = "."; }
- 
--$[ = 1;                       # set array base to 1
-+#$[ = 1;                      # set array base to 1
- $, = ' ';             # set output field separator
- $\ = "\n";            # set output record separator
- 
-@@ -113,12 +113,12 @@ line: while (<>) {
-     # Now split the line into individual fields
-     $n = (@arr = split(' ', $S));
- 
--    if ($arr[1] eq '%token' && $tokenmode == 0) {
-+    if ($arr[0] eq '%token' && $tokenmode == 0) {
-       $tokenmode = 1;
-       &include_stuff('tokens', 'ecpg.tokens', '', 1, 0);
-       #$type = 1;
-     }
--    elsif ($arr[1] eq '%type' && $header_included == 0) {
-+    elsif ($arr[0] eq '%type' && $header_included == 0) {
-       &include_stuff('header', 'ecpg.header', '', 1, 0);
-       &include_stuff('ecpgtype', 'ecpg.type', '', 1, 0);
-       $header_included = 1;
-@@ -126,7 +126,7 @@ line: while (<>) {
- 
-     if ($tokenmode == 1) {
-       $str = '';
--      for ($a = 1; $a <= $n; $a++) {
-+      for ($a = 0; $a < $n; $a++) {
-           if ($arr[$a] eq '/*') {
-               $comment++;
-               next;
-@@ -138,7 +138,7 @@ line: while (<>) {
-           if ($comment) {
-               next;
-           }
--          if (substr($arr[$a], 1, 1) eq '<') {
-+          if (substr($arr[$a], 0, 1) eq '<') {
-               next;
-               # its a type
-           }
-@@ -160,7 +160,7 @@ line: while (<>) {
-     }
- 
-     # Go through each field in turn
--    for ($fieldIndexer = 1; $fieldIndexer <= $n; $fieldIndexer++) {
-+    for ($fieldIndexer = 0; $fieldIndexer < $n; $fieldIndexer++) {
-       if ($arr[$fieldIndexer] eq '*/' && $comment) {
-           $comment = 0;
-           next;
-@@ -316,11 +316,11 @@ sub include_stuff {
-     $inblock = 0;
-     $filename = $path . "/" . $includefilename;
-     while (($_ = &Getline2($filename),$getline_ok)) {
--      if ($includeblock ne '' && $Fld[1] eq 'ECPG:' && $inblock == 0) {
--          if ($Fld[2] eq $includeblock) {
-+      if ($includeblock ne '' && $Fld[0] eq 'ECPG:' && $inblock == 0) {
-+          if ($Fld[1] eq $includeblock) {
-               $copy = 1;
-               $inblock = 1;
--              $includetype = $Fld[3];
-+              $includetype = $Fld[2];
-               if ($includetype eq 'rule') {
-                   &dump_fields($stmt_mode, *fields, $field_count, ' { ');
-               }
-@@ -333,7 +333,7 @@ sub include_stuff {
-           }
-       }
-       else {
--          if ($copy == 1 && $Fld[1] ne 'ECPG:') {
-+          if ($copy == 1 && $Fld[0] ne 'ECPG:') {
-               &add_to_buffer($includestream, $_);
-               $copied = 1;
-               $inblock = 0;
-@@ -387,7 +387,7 @@ sub dump_fields {
-           # Go through each field and try to 'aggregate' the tokens into a 
single 'make_str' where possible
-           $cnt = 0;
-           for ($z = 0; $z < $len; $z++) {
--              if (substr($flds{$z}, 1, 1) eq "\$") {
-+              if (substr($flds{$z}, 0, 1) eq "\$") {
-                   $flds_new{$cnt++} = $flds{$z};
-                   next;
-               }
-@@ -395,7 +395,7 @@ sub dump_fields {
-               $str = $flds{$z};
- 
-               while (1) {
--                  if ($z >= $len - 1 || substr($flds{$z + 1}, 1, 1) eq "\$") {
-+                  if ($z >= $len - 1 || substr($flds{$z + 1}, 0, 1) eq "\$") {
-                       # We're at the end...
-                       $flds_new{$cnt++} = "make_str(\"" . $str . "\")";
-                       last;
-@@ -454,7 +454,7 @@ sub dump_line {
-       return 0;
-     }
-     elsif ($replace_line{$block}) {
--      if (index($line, '|') != 0) {
-+      if (index($line, '|') != -1) {
-           $line = '| ' . $replace_line{$block};
-       }
-       else {
diff --git a/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec 
b/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
index 277d6ff6a..708534e52 100644
--- a/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
+++ b/bigtop-packages/src/rpm/gpdb/SPECS/gpdb.spec
@@ -27,6 +27,8 @@
 
 %undefine _auto_set_build_flags
 
+%global __brp_check_rpaths %{nil}
+
 Name: gpdb
 Version: %{gpdb_version}
 Release: %{gpdb_release}
diff --git a/bigtop-tests/smoke-tests/gpdb/TestGpdb.groovy 
b/bigtop-tests/smoke-tests/gpdb/TestGpdb.groovy
index 0fb03cede..18ce9dab9 100644
--- a/bigtop-tests/smoke-tests/gpdb/TestGpdb.groovy
+++ b/bigtop-tests/smoke-tests/gpdb/TestGpdb.groovy
@@ -46,12 +46,12 @@ class TestGpdb {
   void testGpdb() {
     // Basic test to verify that the server is running, and is in a
     // state that we expect.
-    LOG.info('Test gp_segment_configuration');
+    LOG.info('Test GPDB column query');
     sh.exec("runuser -l gpadmin /home/gpadmin/test-master-db.sh");
     logError(sh);
-    int count = sh.getOut()[2].trim().toInteger()
-    assertFalse(count == 0);
-    LOG.info('Test gp_segment_configuration finished');
-    LOG.info('Configured segments count is '+count);
+    int age = sh.getOut()[2].trim().toInteger()
+    assertFalse(age == 0);
+    LOG.info('Test GPDB column query finished');
+    LOG.info('age is '+age);
   }
 }
diff --git a/bigtop.bom b/bigtop.bom
index eea8002d4..be3e4cfe5 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -331,7 +331,7 @@ bigtop {
     'gpdb' {
       name    = 'gpdb'
       relNotes = 'GreenPlum'
-      version { base = '5.28.5'; pkg = '5.28.5'; release = 1 }
+      version { base = '6.23.4'; pkg = '6.23.4'; release = 1 }
       tarball { destination = "$name-${version.base}.tar.gz"
                 source      = "${version.base}.tar.gz" }
       url     { site = "https://github.com/greenplum-db/gpdb/archive/";

Reply via email to