Greenplum’s package is available for download via Github. What does the Greenplum installation directory contain and what does it do? Today, we will analyze for your attention through this article. Please note that this article only introduces the content of the software installation directory, and does not involve the content of the data storage directory, the two should not be confused.

Software Package Installation Position

Greenplum 6 is installed in the same location as most other applications. The default installation location is /usr/local.

[gpadmin@gp1 localDrwxr-xr-x. 14 root root 187 12月 17 11:24 drwxr-xr-x. 13 root root 155 9月 1 21:55.. Drwxr-xr-x. 2 root root 160 12月 27 17:58 bin drwxr-xr-x. 2 root root 6 4月 11 2018 etc drwxr-xr-x 2018 games drwxr-xr-x 10 root root 272 9月 26 02:53 go LRWXRWXX 1 root root 29 12月 17 11:24 greenplum-db -> /usr/local/greenplum-db-6.2.1 drwxr-xr-x 11 root root 187 12月 17 11:24 greenplum-db-6.2.1 drwxr-xr-x. 3 root root 20 12月 27 17:58 Include drwxr-xr-x. 3 root root 4096 12月 27 17:58 lib drwxr-xr-x. 3 root root 19 9月 8 04:18 lib64 drwxr-xr-x. 2 root 2 root root 6 4月 11 2018 sbin drwxr-xr-x. 9 root root 107 12月 27 17:58 share Drwxr-xr-x. 2 root root 6 4月 11 2018 SRC [gpadmin@gp1local] $pwd
/usr/local
Copy the code

As you can see from the shell query above, there are two things called greenplums. [greenplum-db-6.2.1] is the actual code directory where all greenplum-related content is stored after the software is installed. [greenplum-db] is a soft link that points to the directory above. The soft connection is very convenient for system management and upgrade. The same large version can be upgraded by updating the soft connection point. Using a common soft connection name can also avoid some maintenance program modifications.

Software Catalog Changyou

First let’s take a look at what’s in the Greenplum software installation directory.

Drwxr-xr-x 11 root root 187 12月 17 11:24. drwxr-xr-x. 14 root root 187 12月 17 he.. Drwxr-xr-x 7 root root 4096 12月 17 11:24 bin drwxr-xr-x 3 root root 22 December 17 11:24 docs drwxr-xr-x 2 root root 60 12月 17 11:24 etc drwxr-xr-x 3 root root 20 12月 17 11:24 ext-rwxr-xr -x 1 root root 783 12月 17 11:24 greenplum_path.sh Drwxr-xr-x 4 root root 4096 12月 17 11:24 include drwxr-xr-x 6 root root 4096 12月 17 11:24 lib-rw-r --r-- 1 root root 135617 December 13 02:57 open_source_license_pivotal_greenplum. TXT drwxr-xr-x 7 Root root 93 December 17 11:24 PXF drwxr-xr-x 2 Root root 4096 12月 17 11:24 sbin drwxr-xr-x 5 root root 52 12月 17 11:24 shareCopy the code

Bin directory

The bin directory must be added to the PATH variable if you want to use the bin command. The difference is that you don’t need to manually handle this operation. He does this for you while you’re at source greenplum_path.sh.

gpadmin@gp1 greenplum-db]$ls-al bin total amount 122048 drwxr-xr-x 7 root root 4096 12月 17 11:24. drwxr-xr-x 11 root root 187 December 17 11:24.. -rwxr-xr-x 1 root root 65125 December 13 02:57 analyzedb -rwxr-xr-x 1 root root 251160 December 13 02:57 Clusterdb -rwxr-xr-x 1 Root root 246904 12月 13 02:57 createdb-rwxr-xr-x 1 root root 383616 12月 13 02:57 createlang -rwxr-xr-x 1 root root 249536 12月 13 02:57 createUser -rwxr-xr-x 1 root root 230096 12月 13 02:57 dropdb -rwxr-xr-x 1 root root 383512 12月 13 02:57 droplang-rwxr-xr-x 1 root root 229880 12月 13 02:57 dropuser -rwxr-xr-x 1 root root 2188616 12月 13 02:57 ecpg -rwxr-xr-x 1 root root 16204 12月 13 02:57 gpActivatestandby -rwxr-xr-x 1 root root 493 12月 13 02:57 gpaddmirrors -rwxr-xr-x 1 root root 166749 December 13 02:57 gpCheckcat drwxr-xr-x 2 root root 4096 December 17 11:24 gpcheckcat_modules -rwxr-xr-x 1 root root 2514288 12月 13 02:57 gpCheckcloud -rwxr-xr-x 1 root root 27480 12月 13 02:57 gpCheckperf -rwxr-xr-x 1 root root 6052 December 13 02:57 gpCheckresgroupimpl -rwxr-xr-x 1 root root 22604 December 13 02:57 gpconfig Drwxr-xr-x 2 root root 4096 12月 17 11:24 gpconfig_modules-rwxr-xr-x 1 root root 14497 12月 13 02:57 gpdeletesystem -rwxr-xr-x 1 root root 109833 12月 13 02:57 gpexpand -rwxr-xr-x 1 root root 435688 12月 13 02:57 gpfdist -rwxr-xr-x 1 root root Root 32095 12月 13 02:57 gpinitstandby -rwxr-xr-x 1 root root 81788 12月 13 02:57 gpinitsystem -rwxr-xr-x 1 root root 6475584 12月 13 02:57 gpkafka -rwxr-xr-x 1 root root 320 12月 13 02:57 gpload -rwxr-xr-x 1 root root 202 12月 13 02:57 Bat -rwxr-xr-x 1 root root 107558 12月 13 02:57 gpload.py -rwxr-xr-x 1 root root 82833 12月 13 02:57 gpload.pyc -rwxr-xr-x 1 root root 20933 December 13 02:57 gplogfilter -rwxr-xr-x 1 root root 456216 December 13 02:57 gpmapreduce-rwxr-xr-x 1 root root 373232 December 13 02:57 gpmmon-rwxr-xr-x 1 root root 20400 December 13 02:57 gpMOVemirrors -rwxr-xr-x 1 root root 1224 12月 13 02:57 gpperfmoncat.sh -rwxr-xr-x 1 root root 7675 12月 13 02:57 gpperfmon_install -rwxr-xr-x 1 root root 339 12月 13 02:57 gppkg-rwxr-xr-x 1 root root 547 月 13 02:57 gprecoverseg -rwxr-xr-x 1 root root 1149 月 13 02:57 Gpreload-rwxr-xr-x 1 root root 4144 12月 13 02:57 gpscp-rwxr-xr-x 1 root root 9503 12月 13 02:57 gpsd-rwxr-xr-x 1 root root 4144 12月 13 02:57 gpsd-rwxr-xr-x 1 root Root 233960 12月 13 02:57 gpsmon-rwxr-xr-x 1 root root 19323328 12月 13 02:57 gpss-rwxr-xr-x 1 root root 16547104 12月 13 02:57 gpsscli -rwxr-xr-x 1 root root 9173 12月 13 02:57 gpssh-rwxr-xr-x 1 root root 32583 12月 13 02:57 gpssh-exkeys Drwxr-xr-x 2 root root 98 12月 17 11:24 gpssh_modules-rwxr-xr-x 1 root root 35203 12月 13 02:57 gpstart -rwxr-xr-x 1 root Root 421 12月 13 02:57 gpstate -rwxr-xr-x 1 root root 46654 12月 13 02:57 gpstop -rwxr-xr-x 1 root root 2731 12月 13 02:57 Gpsys1-rwxr-xr-x 1 root root 490216 12月 13 02:57 initdb drwxr-xr-x 3 root root 4096 12月 17 11:24 lib-rwxr-xr-x 1 root Root 15198 12月 13 02:57 minirepro -rwxr-xr-x 1 root root 295288 12月 13 02:57 pg_basebackup -rwxr-xr-x 1 root root 1658352 12月 13 02:57 pgbouncer -rwxr-xr-x 1 root root 102544 12月 13 02:57 pg_config -rwxr-xr-x 1 root root 122920 12月 13 02:57 pg_controldata -rwxr-xr-x 1 root root 156128 December 13 02:57 pg_ctl -rwxr-xr-x 1 root root 1564928 December 13 02:57 Pg_dump-rwxr-xr -x 1 root root 314808 12月 13 02:57 pg_dumpall -rwxr-xr-x 1 root root 232336 12月 13 02:57 pg_isready -rwxr-xr-x 1 root root 182928 December 13 02:57 pg_receivelog -rwxr-xr-x 1 root root 193880 December 13 02:57 pg_recvlogical -rwxr-xr-x 1 root root 165248 December 13 02:57 pg_resetxlog -rwxr-xr-x 1 root root 723712 December 13 02:57 pg_restore-rwxr-xr-x 1 root root 454736 12月 13 02:57 pg_rewind -rwxr-xr-x 1 root root 753768 12月 13 02:57 pg_upupgrade -rwxr-xr-x 1 root root 513592 12月 13 02:57 pg_xlogdump-rwxr-xr-x 1 root root 63414200 12月 13 02:57 postgres LRWXRWXRWX 1 root root 8 12月 17 11:24 postmaster -> postgres-rwxr-xr-x 1 root root 1491912 12月 13 02:57 PSQL -rwxr-xr-x 1 root root 250648 12月 13 02:57 First reindexDB drwxr-xr-x 2 root root 20 12月 17 11:24 stream-rwxr-xr -x 1 root root 259960 12月 13 02:57 vacuumdb [gpadmin@gp1 greenplum-db]$Copy the code

The above list of specific software uses are not detailed, can refer to the official document or part of the Greenplum Chinese community open source GPDB 6 Chinese document (does not include the use of enterprise components, such as GPKafka, GPSS, etc., enterprise components recommended to buy official services or refer to the official English document), here simply mention. Starting with GPDB 5.x, several common components have been added and removed, as follows:

  • Added GPKafka for kafka data interconnection;
  • Added the gpBackup tool for data backup, which is a separate component and not included in the default installation package.
  • Added the GPCopy tool for cluster data replication and migration.
  • Delete the gpCheck tool, which was used to verify operating system parameter configurations.
  • Delete the gpFilespace tool, which was used to create file Spaces.
  • Delete gp_dump and gpcrondump, which are used to backup GP clusters and replaced by gpBackup.

This section describes the RPM directory and the bin subdirectory under the RPM directory. Let’s move on to the rest of the directories.

First, let’s look at all the directories under the package.

Drwxr-xr-x 11 root root 187 12月 17 11:24. drwxr-xr-x. 14 root root 187 12月 17 he.. Drwxr-xr-x 7 root root 4096 12月 17 11:24 bin drwxr-xr-x 3 root root 22 December 17 11:24 docs drwxr-xr-x 2 root root 60 12月 17 11:24 etc drwxr-xr-x 3 root root 20 12月 17 11:24 ext-rwxr-xr -x 1 root root 783 12月 17 11:24 greenplum_path.sh Drwxr-xr-x 4 root root 4096 12月 17 11:24 include drwxr-xr-x 6 root root 4096 12月 17 11:24 lib-rw-r --r-- 1 root root 135617 December 13 02:57 open_source_license_pivotal_greenplum. TXT drwxr-xr-x 7 Root root 93 December 17 11:24 PXF drwxr-xr-x 2 Root root 4096 12月 17 11:24 sbin drwxr-xr-x 5 root root 52 12月 17 11:24 shareCopy the code

Docs directory

This directory stores help information about management commands in the bin directory. Common users do not need to care about the contents in this directory. Take a quick look:

Drwxr-xr-x 11 root root 187 12月 17 11:24. drwxr-xr-x. 14 root root 187 12月 17 he.. Drwxr-xr-x 7 root root 4096 12月 17 11:24 bin drwxr-xr-x 3 root root 22 December 17 11:24 docs drwxr-xr-x 2 root root 60 12月 17 11:24 etc drwxr-xr-x 3 root root 20 12月 17 11:24 ext-rwxr-xr -x 1 root root 783 12月 17 11:24 greenplum_path.sh Drwxr-xr-x 4 root root 4096 12月 17 11:24 include drwxr-xr-x 6 root root 4096 12月 17 11:24 lib-rw-r --r-- 1 root root 135617 December 13 02:57 open_source_license_pivotal_greenplum. TXT drwxr-xr-x 7 Root root 93 December 17 11:24 PXF drwxr-xr-x 2 Root root 4096 12月 17 11:24 sbin drwxr-xr-x 5 root root 52 12月 17 11:24 share [gpadmin@gp1 greenplum-db]$ls-al docs Drwxr-xr-x 3 root root 22 12月 17 11:24. Drwxr-xr-x 11 root root 187 12月 17 11:24.. Drwxr-xr-x 3 root root 4096 12月 17 11:24 cli_help [gpadmin@gp1 greenplum-db]$ls-al docs/cli_help/ total amount 212 drwxr-xr-x 3 Root root 4096 12月 17 11:24 drwxr-xr-x 3 root root 22 12月 17 11:24.. -rwxr-xr-x 1 root root 4752 12月 13 02:57 gpActivatestandBy_help -rwxr-xr-x 1 root root 7678 12月 13 02:57 Gpaddmirrors_help -rwxr-xr-x 1 root root 9221 12月 13 02:57 gpCheckperf_help -rwxr-xr-x 1 root root 6970 12月 13 02:57 Gpconfig_help drwxr-xr-x 2 root root 4096 12月 17 11:24..... . . .Copy the code

Docs/gpconfigs directory

The gpConfigs subdirectory under the docs directory is quite important, and anyone who has taken a close look at the official documentation will remember that it more than once refers to copying reference examples from this directory as templates for operations such as database initialization.

[gpadmin@gp1 docs]$ls -al cli_help/gpconfigs/ total amount 60 drwxr-xr-x 2 root root 4096 12月 17 11:24. drwxr-xr-x 3 root root 4096 December 17 11:24.. -rwxr-xr-x 1 root root 2426 12月 13 02:57 gpinitsystem_config -rwxr-xr-x 1 root root 4511 12月 13 02:57 Gpinitsystem_singlenode -rwxr-xr-x 1 root root 2325 12月 13 02:57 gpinitSystem_test -rwxr-xr-x 1 root root 359 12月 13 02:57 hostfile_gpCheckNET_IC1 -rwxr-xr-x 1 root root 119 December 13 02:57 Hostfile_gpchecknet_IC1 -rwxr-xr-x 1 root root 119 December 13 02:57 Hostfile_gpChecknet_IC2-rwxr-xr -x 1 root root 87 Dec 13 02:57 Hostfile_gpCHECKperf -rwxr-xr-x 1 root root 255 Dec 13 13 02:57 hostFILe_gpexpand -rwxr-xr-x 1 root root 237 12月 13 02:57 Hostfile_gpinitSystem -rwxr-xr-x 1 root root 96 12月 13 02:57 hostfile_gpsSH_allhosts - RWXR -xr-x 1 root root 87 December 13 02:57 Hostfile_gpsSH_segonly - RWXR -xr-x 1 root root 44 12月 13 02:57 HOSTlist_SinglenodeCopy the code

Ext directory

This directory is used to house the Python base environment and some extension packages. Greenplum has specifically integrated Python 2.7 into the installation package to differentiate it from the operating system’s own Python environment (currently using Python 2.7 as the executor), This allows you to run management and maintenance tools (python based tools such as Gpload, gpstart, etc.) directly in Python.

Drwxr-xr-x 6 root root 56 12月 17 11:24. drwxr-xr-x 3 root root 20 December 17 11:24.. Drwxr-xr-x 2 root root 189 12月 17 11:24 bin drwxr-xr-x 3 root root 23 12月 17 11:24 include drwxr-xr-x 4 root root 90 12月 17 11:24 lib drwxr-xr-x 3 root root 17 12月 17 11:24 shareCopy the code

Do not run Greenplum as root, and do not place source greenplum_path.sh in the /etc/profile of the entire Linux system. If you have done so, please change it as soon as possible. This may cause other users of the system, especially root users, to adopt Python with Greenplum. The simplest consequence is that root users may not be able to use yum properly.

“Do not place source greenplum_path.sh in /etc/profile for the entire Linux system”, because the configuration file contains a step to reset pythonHome, you can open it yourself to verify. Here is a snippet of the code:

#setup PYTHONHOME
if [ -x $GPHOME/ext/python/bin/python ]; then
    PYTHONHOME="$GPHOME/ext/python"
    export PYTHONHOME
fiThe greenplum_path.sh file is used to set environment variables. The code is as follows: GPHOME -- Absolute path to Greenplum installation GPHOME -- Update GPHOME to the soft connection path PYTHONHOME -- Set the Python executor used by the Greenplum operating system user to Greenplum OPENSSL_CONF -- set the openSSL configuration file PATH LD_LIBRARY_PATH -- update the variable, add the Python library PATH -- update the variable, Add Greenplum and the Python command GPHOME=/usr/local/ greenplum db -- 6.2.1# Replace with symlink path if it is present and correct
if [ -h ${GPHOME}/.. /greenplum-db ];then
    GPHOME_BY_SYMLINK=`(cd ${GPHOME}/.. /greenplum-db/ &&pwd -P)`
    if [ x"${GPHOME_BY_SYMLINK}" = x"${GPHOME}" ]; then
        GPHOME=`(cd ${GPHOME}/.. /greenplum-db/ &&pwd -L)`/.
    fi
    unset GPHOME_BY_SYMLINK
fi
#setup PYTHONHOME
if [ -x $GPHOME/ext/python/bin/python ]; then
    PYTHONHOME="$GPHOME/ext/python"
    export PYTHONHOME
fi
PYTHONPATH=$GPHOME/lib/python
PATH=$GPHOME/bin:$PYTHONHOME/bin:$PATH
LD_LIBRARY_PATH=$GPHOME/lib:$PYTHONHOME/lib:${LD_LIBRARY_PATH-}
export LD_LIBRARY_PATH
if [ -e $GPHOME/etc/openssl.cnf ]; then
OPENSSL_CONF=$GPHOME/etc/openssl.cnf
export OPENSSL_CONF
fi
export GPHOME
export PATH
export PYTHONPATH
Copy the code

The include directory

Header files. The header files in this directory are mostly public function files, such as libpq and ZSTD. Without explanation, non-developers won’t use it, developers will understand it.

[gpadmin@gp1 greenplum-db]$ls-al include total amount 328 drwxr-xr-x 4 root root 4096 12月 17 11:24. drwxr-xr-x 11 root root 187 December 17 11:24.. -rwxr-xr-x 1 root root 714 12月 13 02:57 ecpg_config.h -rwxr-xr-x 1 root root 2540 12月 13 02:57 ecpgerrno. H -rwxr-xr-x 1 Root root 2758 12月 13 02:57 ecpg_informix. H -rwxr-xr-x 1 root root 2607 12月 13 02:57 ecpglib. H -rwxr-xr-x 1 root root 2621 12月 13 02:57 ecpgtype.h -rwxr-xr-x 1 root root 778 12月 13 02:57 gppc_config.h -rwxr-xr-x 1 root root 65607 12月 13 Gppc.h drwxr-xr-x 2 root root 24 12月 17 11:24 libpq-rwxr-xr-x 1 root root 2208 12月 13 02:57 libpq-events.h -rwxr-xr-x 1 root root 22057 12月 13 02:57 libpq-fe.h -rwxr-xr-x 1 root root 323 12月 13 02:57 pg_config_ext.h -rwxr-xr-x 1 root root 323 12月 13 02:57 pg_config_ext 1 root root 33050 December 13 02:57 pg_config.h -rwxr-xr-x 1 root root 10616 December 13 02:57 pg_config_manual.h -rwxr-xr-x 1 Root root 1052 December 13 02:57 pg_config_os.h -rwxr-xr-x 1 root root 787 December 13 02:57 pgtypes_date.h -rwxr-xr-x 1 root root 530 12月 13 02:57 pgtypes_error. H -rwxr-xr-x 1 root root 222 12月 13 02:57 pgtypes. H -rwxr-xr-x 1 root root 1164 12月 13 02:57 pgtypes_interval. H -rwxr-xr-x 1 root root 2249 December 13 02:57 pgtypes_numeric. H -rwxr-xr-x 1 root root 1031 December 13 02:57 pgtypes_timestamp. H -rwxr-xr-x 1 root root 2144 12月 13 02:57 postgres_ext.h drwxr-xr-x 5 root root 52 12月 17 11:24 Postgresql -rwxr-xr-x 1 root root 834 12月 13 02:57 sql3types. H -rwxr-xr-x 1 root root 1276 12月 13 02:57 sqlca.h -rwxr-xr-x 1 root root 1583 12月 13 02:57 sqlda. H -rwxr-xr-x 1 root root 317 12月 13 02:57 sqlda. H -rwxr-xr-x 1 root root 1583 12月 13 02:57 sqlda Root root 820 12月 13 02:57 sqlda-native. H -rwxr-xr-x 1 root root 3715 12月 13 02:57 zstd_errors. H -rwxr-xr-x 1 root root 94270 December 13 02:57 zstd.hCopy the code

After r looking at the include directory, the remaining directories are lib, PXF, sbin, and share. First, let’s look at all the directories under the package.

Drwxr-xr-x 11 root root 187 12月 17 11:24. drwxr-xr-x. 14 root root 187 12月 17 he.. Drwxr-xr-x 7 root root 4096 12月 17 11:24 bin drwxr-xr-x 3 root root 22 December 17 11:24 docs drwxr-xr-x 2 root root 60 12月 17 11:24 etc drwxr-xr-x 3 root root 20 12月 17 11:24 ext-rwxr-xr -x 1 root root 783 12月 17 11:24 greenplum_path.sh Drwxr-xr-x 4 root root 4096 12月 17 11:24 include drwxr-xr-x 6 root root 4096 12月 17 11:24 lib-rw-r --r-- 1 root root 135617 December 13 02:57 open_source_license_pivotal_greenplum. TXT drwxr-xr-x 7 Root root 93 December 17 11:24 PXF drwxr-xr-x 2 Root root 4096 12月 17 11:24 sbin drwxr-xr-x 5 root root 52 12月 17 11:24 shareCopy the code

Lib directory

The directory is mainly stored in the dynamic link library, the program will dynamically load these library files during the running process. There are other things that you can look at in the catalog.

-rwxr-xr-x 1 root root 662274 12月 13 02:57 libecpg.a -rwxr-xr-x 1 root root 75844 12月 13 02:57 libecpg_compat LRWXRWXRWX 1 root root 21 12月 17 11:24 libecpg_compat.so -> libecpg_compat.so.3.6 LRWXRWXRWX 1 root root 21 12月 17 11:24 3 -> libecpg_compat.so.3.6 -rwxr-xr-x 1 root root 64464 12月 13 02:57 libecpg_compat.so.3.6 LRWXRWXRWX 1 root root 14 12月 17 11:24 libecpg.so -> libecpg.so.6.6 LRWXRWXRWX 1 root root 14 12月 17 11:24 libecpg.so.6 -> Libecpg.so.6.6 -rwxr-xr-x 1 root root 361496 12月 13 02:57 libecpg.so.6.6 lrwxr-xr-x 1 root root 16 12月 17 11:24 Libgpdbcost.so -> libgpdbcost.so.3 LRWXRWXRWX 1 root root 21 12月 17 11:24 libgpdbcost.so.3 -> libgpdbcost.so.3.85.0 -rwxr-xr-x 1 root root 1122528 12月 13 02:57 libgpdbcot.so.3.85.0 LRWXRWXX 1 root root 13 12月 17 11:24 libgpopt.so -> 3 LRWXRWXRWX 1 root root 18 12月 17 11:24 libgpopt.so.3 -> libgpopt.so.3.85.0 -rwxr-xr-x 1 root root 50101096 12月 13 02:57 libgpopt.so.3.85.0 LRWXRWXX 1 root root 12月 17 11:24 libgpos.so -> libgpos.so.3 LRWXRWXX 1 root Root 17 12月 17 11:24 libgpos.so.3 -> libgpos.so.3.85.0 -rwxr-xr-x 1 root root 1988592 12月 13 02:57 libgpos.so.3.85.0 -rwxr-xr-x 1 root root 1988592 12月 13 02:57 libgpos.so.3.85.0 -rwxr-xr-x 1 root root 259280 12月 13 02:57 libgppc.a LRWXRWXX 1 root root 14 12月 17 11:24 libgppc.so -> libgppc.so1.2 LRWXRWXRWX 1 root root 14 12月 17 11:24 libgppc.so.1 -> libgppc.so.1.2 -rwxr-xr-x 1 root root 149680 12月 13 02:57 Libgppc. So. 1.2... . .Copy the code

Lib/gpperfmon directory

This directory contains the gpPerfmon (monitoring library for GPCC) schema initialization file gpPerfmon.sql, which can be used to create the corresponding inner appearance in gpPerfmon. The specific content can be opened to see, you can construct a GPCC according to the content of the pattern.

Lib/pkgconfig directory

The.pc files used to specify file location, version number, compilation options, and so on when compiling and linking library files.

[gpadmin@gp1 pkgconfig]$ cat libzstd.pc
# ZSTD - standard compression algorithm
# Copyright (C) 2014-2016, Yann Collet, Facebook
# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)prefix=/usr libdir=/usr/lib64 includedir=/usr/include Name: zstd Description: Fast Lossless Compression Algorithm Library URL: http://www.zstd.net/ Version: 1.3.7 Libs: -l${libdir} -lzstd
Cflags: -I${includedir}
Copy the code

Lib/postgresql directory

Because Greenplum is based on the PostgreSQL kernel, some PostgreSQL dynamically linked libraries are housed in this directory.

[gpadmin@gp1 postgresql]$ls-al 41768 drwxr-xr-x 3 root root 4096 12/17 11:24. drwxr-xr-x 6 root root 4096 12/17 The richest.. -rwxr-xr-x 1 root root 19920 12月 13 02:57 ascii_and_mic. So-rwxr-xr-x 1 root root 97376 12月 13 02:57 auto_explain.so -rwxr-xr-x 1 root root 54600 12月 13 02:57 citext.so -rwxr-xr-xr-x 1 root root 49528 12月 13 02:57 cyrillic_and_mic.so -rwxr-xr-x 1 root root 245704 12月 13 02:57 dblink. So -rwxr-xr-x 1 root root 1267072 12月 13 02:57 dict_snowball -rwxr-xr-x 1 root root 404864 12月 13 02:57 diskquota. So -rwxr-xr-x 1 root root 29880 12月 13 02:57 euc2004_sjis2004.so -rwxr-xr-x 1 root root 21728 12月 13 02:57 euc_cn_and_mic.so -rwxr-xr-x 1 root root 40496 12月 13 02:57 euc_jp_and_sjis.so -rwxr-xr-x 1 root root 21720 12月 13 02:57 euc_kr_and_mic.so -rwxr-xr-x 1 root root 40536 12月 13 02:57 Euc_tw_and_big5. So-rwxr-xr-x 1 root root 109176 12月 13 02:57 fixedWidth. So-rwxr-xr-x 1 root root 185416 12月 13 02:57 -rwxr-xr-x 1 root root 82288 12月 13 02:57 gp_AO_CO_diagnostics. -rwxr-xr-x 1 root root 7464944 12月 13 So -rwxr-xr-x 1 root root 85288 12月 13 02:57 gp_distribution_policy. So -rwxr-xr-x 1 root root 77768 12月 13 02:57 gpextProtocol. So-rwxr-xr-x 1 root root 611544 12月 13 02:57 gpfmt_avro. so-rwxr-xr-x 1 root root 113624 12月 13 02:57 gpfmt_binary. So-rwxr-xr-x 1 root root 474792 12月 13 02:57 gpfmt_confluent_avro. so-rwxr-xr-x 1 root root 110680 12月 13 02:57 gpfmt_delimite. so-rwxr-xr-x 1 root root 108192 12月 13 02:57 gpfmt_json. So-rwxr-xr-x 1 root root 749016 12月 13 02:57 gpfmt_kafka. So-rwxr-xr-x 1 root root 17311712 12月 13 02:57 gpfmt_protobuf. So-rwxr-xr-x 1 root root 82088 December 13 02:57 gpformatter.so............ . .Copy the code

As you can see from the name of the library file above, part of greenplum’s dynamic link library is also included here.

Lib/python directory

This directory holds library files used by Python, such as: Yaml, pygresql, this is the inside of the more important a pygresql, this is the language of the python database access postgresql department interface library, now works with more with the same repository and psycopg2, of course, that is chosen is pygresql.

gpadmin@gp1 python]$ls-al total amount 220 drwxr-xr-x 7 root root 222 12月 17 11:24. Drwxr-xr-x 6 root root 4096 12月 17 11:24 . Drwxr-xr-x 10 root root 4096 12月 17 11:24 gppylib-rwxr-xr-x 1 root root 0 12月 13 02:57 __init__.py -rwxr-xr-x 1 root Root 111 12月 13 02:57 __init__. Pyc drwxr-xr-x 2 root root 90 12月 17 11:24 lockfile -rwxr-xr-x 1 root root 69992 12月 13 02:57_posixsubprocess. so drwxr-xr-x 3 root root 4096 12月 17 11:24 psutil drwxr-xr-x 2 root root 117 12月 17 11:24 Pygresql -rwxr-xr-x 1 root root 3758 12月 13 02:57 subprocess32 -changelog -rwxr-xr-x 1 root root 74362 12月 13 02:57 Py -rwxr-xr-x 1 root root 48477 12月 13 02:57 subprocess32.pyc DRWXR -xr-x 2 root root 4096 12月 17 11:24 YAMlCopy the code

Sbin directory

The files stored in this directory are mainly internal commands of cluster management tools in the bin directory. These Python scripts cannot be invoked directly, but can only be invoked by corresponding scripts in the bin directory. This directory is not visible to the user during use, the program will automatically call, can be ignored. But don’t forget the script files in this section if you need to modify the source code.

Drwxr-xr-x 2 root root 4096 12月 17 11:24. drwxr-xr-x 11 root root 187 December 17 11:24.. -rwxr-xr-x 1 root root 2808 12月 13 02:57 gpCleanSegmentdir. py -rwxr-xr-x 1 root root 3303 12月 13 02:57 Pyc -rwxr-xr-x 1 root root 6541 12月 13 02:57 gpconfig_helper.py -rwxr-xr-x 1 root root 5648 12月 13 02:57 gpconfig_helper. Pyc - rwxr-xr-x mto 1 root root on December 13, 9089 02:57 gpgetstatususingtransition. Py - rwxr-xr-x mto 1 root root On December 13, 8302 02:57 gpgetstatususingtransition. Pyc - rwxr-xr-x mto 1 root root on December 13, 1338 02:57 gpmon_catqrynow. Py - rwxr-xr-x mto 1 root root 1186 12月 13 02:57 gpmon_catqrynow.pyc -rwxr-xr-x 1 root root 1937 12月 13 02:57 gpoperation.py -rwxr-xr-x 1 Root root 1565 12月 13 02:57 gpOper. pyc -rwxr-xr-x 1 root root 14843 12月 13 02:57 gpsegstart.py -rwxr-xr-x 1 root Root 12309 12月 13 02:57 gpsegstart.pyc -rwxr-xr-x 1 root root 8247 12月 13 02:57 gpsegstop.py -rwxr-xr-x 1 root root 7641 12月 13 02:57 gpsegstop.py -rwxr-xr-x 1 root root 7641 12月 13 02:57 gpsegstop.pyc -rwxr-xr-x 1 root root 7797 12月 13 02:57 packcoreCopy the code

Share directory

This is the last directory, and one of the more important ones, the most important of which is the PostgresQL subdirectory.

[gpadmin@gp1 greenplum-db]$ls -al share drwxr-xr-x 3 root root 24 12月 17 11:24 doc drwxr-xr-x 2 root root 41 12月 17 11:24 greenplum drwxr-xr-x 8 root root 4096 12月 17 11:24 postgresQLCopy the code

Share/doc directory

The directory currently contains only documentation for orafCE extensions. You can cat open it yourself.

[gpadmin @ gp1 greenplum - db] $ls - al share/doc/postgresql/extension/total dosage of 40 DRWXR xr - 75 on December 17, after x 2 root root. Drwxr-xr-x 3 root root 23 12月 17 11:24.. -rwxr-xr-x 1 root root 987 12月 13 02:57 COPYRIGHT. Orafce -rwxr-xr-x 1 root root 874 12月 13 02:57 INSTALL -rwxr-xr-x 1 root root 31364 12月 13 02:57 readme.asciidocCopy the code

Share/postgresql/extension directory

This directory contains a number of control and SQL files for creating extensions, notably: Citext, DBLINK, hStore, ORafCE, Stored Procedure Language extensions, PXF, etc., so we can say that when we execute the CREATE Extention XXXX statement in the Greenplum database, It finds the corresponding Control file from this directory and executes the corresponding SQL, creating the corresponding functions, types, and so on in the database.

[gpadmin @ gp1 greenplum - db] $ls - al share/postgresql/extension/total amount DRWXR xr - 432 - x 2 root root on December 17, after 4096. Drwxr-xr-x 8 root root 4096 12月 17 11:24.. -rwxr-xr-x 1 root root 1028 12月 13 02:57 citext--1.0--1.1. SQL -rwxr-xr-x 1 root root 12337 12月 13 02:57 citext--1.0.sql -rwxr-xr-x 1 root root 1001 12月 13 02:57 citext--1.1-- 1.1. SQL -rwxr-xr-x 1 root root 12364 12月 13 02:57 citext--1.1.sql -rwxr-xr-x 1 root root 158 12月 13 02:57 citext. Control -rwxr-xr-x 1 root root 9839 12月 13 02:57 Citext --unpackaged-- 1.1. SQL -rwxr-xr-x 1 root root 419 12月 13 02:57 dblink-- 1.0-1.1. SQL -rwxr-xr-x 1 root root 5936 12月 SQL -rwxr-xr-x 1 root root 170 12月 13 02:57 dblink. Control -rwxr-xr-x 1 root root 2863 12月 13 SQL -rw-r--r-- 1 root root 2674 12月 13 02:57 diskQuota --1.0. SQL -rw-r--r-- 1 root root 12月 13 02:57 diskquota. Control-rwxr-xr-x 1 root root 1436 12月 13 02:57 fuzzystrmatch--1.0.sql -rwxr-xr-x 1 root root 175 12月 13 02:57 fuzzystrMatch. Control-rwxr-xr-x 1 root root 1108 12月 13 02:57 Fuzzystrmatch --unpackaged--1.0 . . .Copy the code

PXF directory

In the GPDB 4.x era, we connected to Hadoop systems through GPHDFS, but this method was not very available and scalable. So starting with GPDB 5.x, GPDB borrowed the PXF framework from HAWQ (another open-source software from Pivotal, with an HDF-based underlying storage, gpDB-based front-end engine, and massively parallel processing). The framework is created in GPDB as an extension. It enables GPDB to query data from HDFS, Hbase, Hive, or other storage in parallel. PXF interacts with Hadoop through Java on the target side, and C on the GPDB side for low-level interaction. Integrate GPDB and Hadoop data. To use aspects, you simply specify the protocol as PXF when creating the external table.

[gpadmin@gp1 PXF]$ls-al total amount 4 drwxr-xr-x 7 root root 93 12月 17 11:24. Drwxr-xr-x 11 root root 187 12月 17 11:24.. Drwxr-xr-x 9 root root 220 12月 17 11:24 apache-tomcat drwxr-xr-x 2 root root 32 12月 17 11:24 bin drwxr-xr-x 2 root root 64 12月 17 11:24 conf drwxr-xr-x 3 root root 252 12月 17 11:24 lib drwxr-xr-x 5 root root 43 12月 17 11:24 templates -rw-r--r-- 1 root root 7 12月 13 02:57 versionCopy the code

I won’t go into the details of each PXF subdirectory here, but I’ll explain it later in the PXF introduction article.