1628
PRODUCT DOCUMENTATION Pivotal Greenplum Database ® Version 6.6 Pivotal Greenplum Database Documentation Rev: A01 © 2020 Pivotal Software, Inc.

Pivotal Greenplum Database · Contents Release Notes 4 Initializing Greenplum Database.....61

  • Upload
    others

  • View
    42

  • Download
    0

Embed Size (px)

Citation preview

  • PRODUCT DOCUMENTATION

    Pivotal™ GreenplumDatabase®Version 6.6

    Pivotal Greenplum DatabaseDocumentationRev: A01

    © 2020 Pivotal Software, Inc.

  • Copyright Release Notes

    2

    Notice

    Copyright

    Privacy Policy | Terms of Use

    Copyright © 2020 Pivotal Software, Inc. All rights reserved.

    Pivotal Software, Inc. believes the information in this publication is accurate as of its publication date. Theinformation is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED"AS IS." PIVOTAL SOFTWARE, INC. ("Pivotal") MAKES NO REPRESENTATIONS OR WARRANTIES OF ANYKIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMSIMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

    Use, copying, and distribution of any Pivotal software described in this publication requires an applicablesoftware license.

    All trademarks used herein are the property of Pivotal or their respective owners.

    Revised April 2020 (6.6.0)

    http://pivotal.io/privacy-policyhttp://pivotal.io/terms-of-use

  • Contents Release Notes

    3

    Contents

    Chapter 1: Pivotal Greenplum 6.6 Release Notes.................................. 14Release 6.6.0.................................................................................................................................... 15

    Features.................................................................................................................................. 15Resolved Issues..................................................................................................................... 15Upgrading to Greenplum 6.6.0...............................................................................................16

    Deprecated Features.........................................................................................................................17Migrating Data to Greenplum 6........................................................................................................ 19Known Issues and Limitations.......................................................................................................... 20Differences Compared to Open Source Greenplum Database.........................................................22

    Chapter 2: Installing and Upgrading Greenplum................................... 23Platform Requirements......................................................................................................................24

    Operating Systems................................................................................................................. 24Hardware and Network...........................................................................................................26Storage....................................................................................................................................27Tools and Extensions Compatibility....................................................................................... 27Hadoop Distributions.............................................................................................................. 29

    Introduction to Greenplum.................................................................................................................31The Greenplum Master...........................................................................................................32The Segments........................................................................................................................ 32The Interconnect.....................................................................................................................36ETL Hosts for Data Loading.................................................................................................. 38Greenplum Performance Monitoring...................................................................................... 39

    Estimating Storage Capacity............................................................................................................. 41Calculating Usable Disk Capacity.......................................................................................... 41Calculating User Data Size.................................................................................................... 42Calculating Space Requirements for Metadata and Logs......................................................42

    Configuring Your Systems.................................................................................................................43Disabling SELinux and Firewall Software.............................................................................. 43Recommended OS Parameters Settings............................................................................... 44Synchronizing System Clocks................................................................................................ 51Creating the Greenplum Administrative User.........................................................................52Next Steps.............................................................................................................................. 53

    Installing the Greenplum Database Software................................................................................... 54Installing Greenplum Database.............................................................................................. 54Enabling Passwordless SSH.................................................................................................. 55Confirming Your Installation................................................................................................... 56About Your Greenplum Database Installation........................................................................56Next Steps.............................................................................................................................. 56

    Creating the Data Storage Areas......................................................................................................57Creating Data Storage Areas on the Master and Standby Master Hosts...............................57Creating Data Storage Areas on Segment Hosts.................................................................. 57Next Steps.............................................................................................................................. 58

    Validating Your Systems................................................................................................................... 59Validating Network Performance............................................................................................ 59Validating Disk I/O and Memory Bandwidth...........................................................................60

    Initializing a Greenplum Database System.......................................................................................61Overview................................................................................................................................. 61

  • Contents Release Notes

    4

    Initializing Greenplum Database.............................................................................................61Setting Greenplum Environment Variables............................................................................ 65Next Steps.............................................................................................................................. 65

    Installing Optional Extensions........................................................................................................... 67Procedural Language, Machine Learning, and Geospatial Extensions..................................67Python Data Science Module Package..................................................................................67R Data Science Library Package........................................................................................... 71Greenplum Platform Extension Framework (PXF)................................................................. 74

    Installing Additional Supplied Modules..............................................................................................75Configuring Timezone and Localization Settings..............................................................................76

    Configuring the Timezone...................................................................................................... 76About Locale Support in Greenplum Database..................................................................... 76Character Set Support............................................................................................................78Setting the Character Set.......................................................................................................80Character Set Conversion Between Server and Client..........................................................81

    Upgrading from an Earlier Greenplum 6 Release............................................................................ 84Upgrading from 6.x to a Newer 6.x Release......................................................................... 84Troubleshooting a Failed Upgrade.........................................................................................86

    Migrating Data from Greenplum 4.3 or 5..........................................................................................87Preparing the Greenplum 6 Cluster....................................................................................... 87Preparing Greenplum 4.3 and 5 Databases for Backup........................................................ 88Backing Up and Restoring a Database..................................................................................90Completing the Migration........................................................................................................91

    Enabling iptables (Optional).............................................................................................................. 94Example iptables Rules..........................................................................................................94

    Installation Management Utilities.......................................................................................................97Greenplum Environment Variables................................................................................................... 98

    Required Environment Variables............................................................................................98Optional Environment Variables............................................................................................. 98

    Example Ansible Playbook..............................................................................................................100

    Chapter 3: Greenplum Database Administrator Guide........................ 102Greenplum Database Concepts...................................................................................................... 103

    About the Greenplum Architecture....................................................................................... 103About Management and Monitoring Utilities........................................................................ 106About Concurrency Control in Greenplum Database...........................................................107About Parallel Data Loading................................................................................................ 114About Redundancy and Failover in Greenplum Database...................................................115About Database Statistics in Greenplum Database............................................................. 117

    Managing a Greenplum System..................................................................................................... 125About the Greenplum Database Release Version Number................................................. 125Starting and Stopping Greenplum Database....................................................................... 125Accessing the Database.......................................................................................................128Configuring the Greenplum Database System.....................................................................136Enabling Compression..........................................................................................................138Enabling High Availability and Data Consistency Features................................................. 139Backing Up and Restoring Databases................................................................................. 157Expanding a Greenplum System..........................................................................................198Migrating Data with gpcopy..................................................................................................213Monitoring a Greenplum System..........................................................................................213Routine System Maintenance Tasks....................................................................................229Recommended Monitoring and Maintenance Tasks............................................................ 233

    Managing Greenplum Database Access.........................................................................................240Configuring Client Authentication......................................................................................... 240Managing Roles and Privileges............................................................................................259

  • Contents Release Notes

    5

    Defining Database Objects..............................................................................................................266Creating and Managing Databases......................................................................................266Creating and Managing Tablespaces...................................................................................268Creating and Managing Schemas........................................................................................270Creating and Managing Tables............................................................................................ 272Choosing the Table Storage Model..................................................................................... 277Partitioning Large Tables......................................................................................................288Creating and Using Sequences........................................................................................... 301Using Indexes in Greenplum Database............................................................................... 304Creating and Managing Views............................................................................................. 308Creating and Managing Materialized Views.........................................................................308

    Distribution and Skew..................................................................................................................... 310Local (Co-located) Joins.......................................................................................................310Data Skew............................................................................................................................ 310Processing Skew.................................................................................................................. 311

    Inserting, Updating, and Deleting Data...........................................................................................314About Concurrency Control in Greenplum Database...........................................................314Inserting Rows...................................................................................................................... 315Updating Existing Rows........................................................................................................316Deleting Rows.......................................................................................................................316Working With Transactions...................................................................................................317Global Deadlock Detector.....................................................................................................318Vacuuming the Database..................................................................................................... 320Running Out of Locks...........................................................................................................320

    Querying Data................................................................................................................................. 322About Greenplum Query Processing....................................................................................322About GPORCA....................................................................................................................325Defining Queries................................................................................................................... 338WITH Queries (Common Table Expressions)......................................................................350Using Functions and Operators............................................................................................354Working with JSON Data..................................................................................................... 365Working with XML Data........................................................................................................378Using Full Text Search.........................................................................................................390Using Greenplum MapReduce............................................................................................. 426Query Performance.............................................................................................................. 434Managing Spill Files Generated by Queries........................................................................ 435Query Profiling...................................................................................................................... 435

    Working with External Data.............................................................................................................441Accessing External Data with PXF...................................................................................... 441Defining External Tables...................................................................................................... 441Accessing External Data with Foreign Tables..................................................................... 459Using the Greenplum Parallel File Server (gpfdist)..............................................................468

    Loading and Unloading Data.......................................................................................................... 472Loading Data Using an External Table................................................................................ 473Loading and Writing Non-HDFS Custom Data.................................................................... 473Handling Load Errors............................................................................................................476Loading Data with gpload.....................................................................................................478Accessing External Data with PXF...................................................................................... 479Transforming External Data with gpfdist and gpload........................................................... 480Loading Data with COPY..................................................................................................... 490Running COPY in Single Row Error Isolation Mode............................................................491Optimizing Data Load and Query Performance................................................................... 491Unloading Data from Greenplum Database......................................................................... 491Formatting Data Files........................................................................................................... 494Example Custom Data Access Protocol.............................................................................. 497

    Managing Performance................................................................................................................... 504

  • Contents Release Notes

    6

    Defining Database Performance.......................................................................................... 504Common Causes of Performance Issues............................................................................ 505Greenplum Database Memory Overview............................................................................. 508Managing Resources............................................................................................................512Investigating a Performance Problem.................................................................................. 541

    Chapter 4: Greenplum Database Security Configuration Guide......... 544Securing the Database....................................................................................................................545Greenplum Database Ports and Protocols..................................................................................... 546Configuring Client Authentication.................................................................................................... 550

    Allowing Connections to Greenplum Database....................................................................550Editing the pg_hba.conf File.................................................................................................552Authentication Methods........................................................................................................ 553SSL Client Authentication.....................................................................................................556PAM-Based Authentication...................................................................................................558Radius Authentication...........................................................................................................559Limiting Concurrent Connections......................................................................................... 560Encrypting Client/Server Connections..................................................................................560

    Configuring Database Authorization................................................................................................562Access Permissions and Roles............................................................................................562Managing Object Privileges..................................................................................................562Using SSH-256 Encryption...................................................................................................563Restricting Access by Time..................................................................................................565Dropping a Time-based Restriction.................................................................................... 567

    Greenplum Command Center Security........................................................................................... 568Auditing............................................................................................................................................ 571Encrypting Data and Database Connections.................................................................................. 576

    Encrypting gpfdist Connections............................................................................................ 576Encrypting Data at Rest with pgcrypto.................................................................................577

    Security Best Practices................................................................................................................... 585

    Chapter 5: Greenplum Database Best Practices..................................589Best Practices Summary.................................................................................................................590System Configuration...................................................................................................................... 596Schema Design............................................................................................................................... 601

    Data Types........................................................................................................................... 601Storage Model...................................................................................................................... 601Compression......................................................................................................................... 602Distributions.......................................................................................................................... 603Partitioning............................................................................................................................ 606Indexes..................................................................................................................................608Column Sequence and Byte Alignment............................................................................... 608

    Memory and Resource Management with Resource Groups......................................................... 610Memory and Resource Management with Resource Queues........................................................ 613System Monitoring and Maintenance..............................................................................................617

    Monitoring............................................................................................................................. 617Updating Statistics with ANALYZE.......................................................................................618Managing Bloat in the Database..........................................................................................619Monitoring Greenplum Database Log Files..........................................................................623

    Loading Data................................................................................................................................... 625INSERT Statement with Column Values..............................................................................625COPY Statement.................................................................................................................. 625External Tables.....................................................................................................................625External Tables with Gpfdist................................................................................................ 625

  • Contents Release Notes

    7

    Gpload...................................................................................................................................626Best Practices.......................................................................................................................627

    Security............................................................................................................................................ 628Encrypting Data and Database Connections.................................................................................. 631Tuning SQL Queries....................................................................................................................... 640

    How to Generate Explain Plans........................................................................................... 640How to Read Explain Plans................................................................................................. 640Optimizing Greenplum Queries............................................................................................ 642

    High Availability............................................................................................................................... 644Disk Storage......................................................................................................................... 644Master Mirroring....................................................................................................................644Segment Mirroring................................................................................................................ 645Dual Clusters........................................................................................................................ 646Backup and Restore.............................................................................................................646Detecting Failed Master and Segment Instances................................................................ 647Segment Mirroring Configuration..........................................................................................648

    Chapter 6: Greenplum Database Utility Guide..................................... 653About the Greenplum Database Utilities.........................................................................................654

    Referencing IP Addresses....................................................................................................654Running Backend Server Programs.....................................................................................654

    Utility Reference.............................................................................................................................. 656analyzedb..............................................................................................................................657clusterdb................................................................................................................................661createdb................................................................................................................................ 663createlang............................................................................................................................. 665createuser............................................................................................................................. 666dropdb................................................................................................................................... 669droplang................................................................................................................................ 670dropuser................................................................................................................................ 671gpactivatestandby................................................................................................................. 673gpaddmirrors......................................................................................................................... 675gpbackup_manager.............................................................................................................. 678gpbackup...............................................................................................................................682gpcheckcat............................................................................................................................ 688gpcheckperf...........................................................................................................................691gpconfig.................................................................................................................................694gpcopy...................................................................................................................................697gpdeletesystem..................................................................................................................... 697gpexpand.............................................................................................................................. 698gpfdist....................................................................................................................................702gpinitstandby......................................................................................................................... 705gpinitsystem.......................................................................................................................... 707gpload................................................................................................................................... 714gplogfilter...............................................................................................................................725gpmapreduce........................................................................................................................ 728gpmapreduce.yaml................................................................................................................729gpmovemirrors...................................................................................................................... 736gpperfmon_install..................................................................................................................738gppkg.................................................................................................................................... 742gprecoverseg........................................................................................................................ 743gpreload................................................................................................................................ 747gprestore............................................................................................................................... 749gpscp.....................................................................................................................................756gpssh.....................................................................................................................................757

  • Contents Release Notes

    8

    gpssh-exkeys........................................................................................................................ 760gpstart................................................................................................................................... 762gpstate.................................................................................................................................. 764gpstop................................................................................................................................... 768gpsys1...................................................................................................................................771pg_config...............................................................................................................................772pg_dump............................................................................................................................... 774pg_dumpall............................................................................................................................782pg_restore............................................................................................................................. 787pgbouncer............................................................................................................................. 792pgbouncer.ini.........................................................................................................................793pgbouncer-admin.................................................................................................................. 805plcontainer.............................................................................................................................814plcontainer Configuration File...............................................................................................819psql........................................................................................................................................823reindexdb.............................................................................................................................. 847vacuumdb..............................................................................................................................849

    Additional Supplied Programs......................................................................................................... 852

    Chapter 7: Greenplum Database Reference Guide.............................. 853SQL Commands.............................................................................................................................. 854

    SQL Syntax Summary..........................................................................................................857ABORT..................................................................................................................................895ALTER AGGREGATE...........................................................................................................896ALTER COLLATION.............................................................................................................897ALTER CONVERSION......................................................................................................... 898ALTER DATABASE.............................................................................................................. 899ALTER DEFAULT PRIVILEGES.......................................................................................... 900ALTER DOMAIN...................................................................................................................903ALTER EXTENSION.............................................................................................................905ALTER EXTERNAL TABLE..................................................................................................907ALTER FOREIGN DATA WRAPPER...................................................................................909ALTER FOREIGN TABLE.................................................................................................... 910ALTER FUNCTION...............................................................................................................914ALTER GROUP.................................................................................................................... 916ALTER INDEX...................................................................................................................... 917ALTER LANGUAGE............................................................................................................. 919ALTER MATERIALIZED VIEW.............................................................................................919ALTER OPERATOR............................................................................................................. 921ALTER OPERATOR CLASS................................................................................................ 922ALTER OPERATOR FAMILY...............................................................................................922ALTER PROTOCOL............................................................................................................. 925ALTER RESOURCE GROUP.............................................................................................. 926ALTER RESOURCE QUEUE...............................................................................................929ALTER ROLE....................................................................................................................... 931ALTER SCHEMA..................................................................................................................936ALTER SEQUENCE............................................................................................................. 936ALTER SERVER.................................................................................................................. 938ALTER TABLE......................................................................................................................940ALTER TABLESPACE..........................................................................................................953ALTER TEXT SEARCH CONFIGURATION.........................................................................954ALTER TEXT SEARCH DICTIONARY................................................................................ 955ALTER TEXT SEARCH PARSER........................................................................................956ALTER TEXT SEARCH TEMPLATE....................................................................................957ALTER TRIGGER.................................................................................................................957

  • Contents Release Notes

    9

    ALTER TYPE........................................................................................................................958ALTER USER....................................................................................................................... 961ALTER USER MAPPING..................................................................................................... 962ALTER VIEW........................................................................................................................ 963ANALYZE..............................................................................................................................964BEGIN................................................................................................................................... 968CHECKPOINT.......................................................................................................................970CLOSE.................................................................................................................................. 971CLUSTER............................................................................................................................. 971COMMENT............................................................................................................................973COMMIT................................................................................................................................976COPY.................................................................................................................................... 977CREATE AGGREGATE........................................................................................................989CREATE CAST.....................................................................................................................995CREATE COLLATION..........................................................................................................999CREATE CONVERSION.................................................................................................... 1000CREATE DATABASE......................................................................................................... 1001CREATE DOMAIN..............................................................................................................1003CREATE EXTENSION........................................................................................................1005CREATE EXTERNAL TABLE.............................................................................................1006CREATE FOREIGN DATA WRAPPER..............................................................................1016CREATE FOREIGN TABLE............................................................................................... 1017CREATE FUNCTION..........................................................................................................1020CREATE GROUP............................................................................................................... 1029CREATE INDEX................................................................................................................. 1030CREATE LANGUAGE........................................................................................................ 1034CREATE MATERIALIZED VIEW........................................................................................1037CREATE OPERATOR........................................................................................................ 1039CREATE OPERATOR CLASS........................................................................................... 1043CREATE OPERATOR FAMILY..........................................................................................1046CREATE PROTOCOL........................................................................................................ 1047CREATE RESOURCE GROUP......................................................................................... 1048CREATE RESOURCE QUEUE..........................................................................................1051CREATE ROLE.................................................................................................................. 1055CREATE RULE...................................................................................................................1059CREATE SCHEMA.............................................................................................................1061CREATE SEQUENCE........................................................................................................ 1063CREATE SERVER............................................................................................................. 1065CREATE TABLE.................................................................................................................1067CREATE TABLE AS...........................................................................................................1081CREATE TABLESPACE.....................................................................................................1084CREATE TRIGGER............................................................................................................1086CREATE TEXT SEARCH CONFIGURATION....................................................................1088CREATE TEXT SEARCH DICTIONARY............................................................................1089CREATE TEXT SEARCH PARSER...................................................................................1090CREATE TEXT SEARCH TEMPLATE...............................................................................1091CREATE TYPE...................................................................................................................1092CREATE USER.................................................................................................................. 1099CREATE USER MAPPING................................................................................................ 1100CREATE VIEW................................................................................................................... 1101DEALLOCATE.................................................................................................................... 1104DECLARE........................................................................................................................... 1104DELETE.............................................................................................................................. 1107DISCARD............................................................................................................................ 1110DO.......................................................................................................................................1111DROP AGGREGATE..........................................................................................................1112

  • Contents Release Notes

    10

    DROP CAST.......................................................................................................................1113DROP COLLATION............................................................................................................ 1114DROP CONVERSION........................................................................................................ 1115DROP DATABASE............................................................................................................. 1116DROP DOMAIN.................................................................................................................. 1116DROP EXTENSION............................................................................................................1117DROP EXTERNAL TABLE.................................................................................................1118DROP FOREIGN DATA WRAPPER..................................................................................1119DROP FOREIGN TABLE................................................................................................... 1119DROP FUNCTION..............................................................................................................1120DROP GROUP................................................................................................................... 1121DROP INDEX..................................................................................................................... 1122DROP LANGUAGE.............................................................................................................1123DROP MATERIALIZED VIEW............................................................................................1123DROP OPERATOR............................................................................................................ 1124DROP OPERATOR CLASS............................................................................................... 1125DROP OPERATOR FAMILY.............................................................................................. 1126DROP OWNED...................................................................................................................1127DROP PROTOCOL............................................................................................................ 1128DROP RESOURCE GROUP..............................................................................................1128DROP RESOURCE QUEUE.............................................................................................. 1129DROP ROLE.......................................................................................................................1130DROP RULE.......................................................................................................................1131DROP SCHEMA................................................................................................................. 1132DROP SEQUENCE............................................................................................................ 1133DROP SERVER..................................................................................................................1133DROP TABLE..................................................................................................................... 1134DROP TABLESPACE.........................................................................................................1135DROP TEXT SEARCH CONFIGURATION........................................................................1136DROP TEXT SEARCH DICTIONARY................................................................................1137DROP TEXT SEARCH PARSER....................................................................................... 1138DROP TEXT SEARCH TEMPLATE...................................................................................1138DROP TRIGGER................................................................................................................ 1139DROP TYPE....................................................................................................................... 1140DROP USER...................................................................................................................... 1141DROP USER MAPPING.....................................................................................................1141DROP VIEW....................................................................................................................... 1142END.....................................................................................................................................1142EXECUTE........................................................................................................................... 1143EXPLAIN............................................................................................................................. 1144FETCH................................................................................................................................ 1149GRANT................................................................................................................................1151INSERT............................................................................................................................... 1156LOAD.................................................................................................................................. 1159LOCK.................................................................................................................................. 1160MOVE..................................................................................................................................1163PREPARE........................................................................................................................... 1164REASSIGN OWNED...........................................................................................................1166REFRESH MATERIALIZED VIEW..................................................................................... 1167REINDEX............................................................................................................................ 1168RELEASE SAVEPOINT......................................................................................................1170RESET................................................................................................................................ 1171REVOKE............................................................................................................................. 1171ROLLBACK......................................................................................................................... 1174ROLLBACK TO SAVEPOINT.............................................................................................1175SAVEPOINT........................................................................................................................1176

  • Contents Release Notes

    11

    SELECT.............................................................................................................................. 1178SELECT INTO.................................................................................................................... 1196SET..................................................................................................................................... 1197SET CONSTRAINTS.......................................................................................................... 1199SET ROLE.......................................................................................................................... 1200SET SESSION AUTHORIZATION..................................................................................... 1201SET TRANSACTION.......................................................................................................... 1202SHOW................................................................................................................................. 1205START TRANSACTION..................................................................................................... 1206TRUNCATE.........................................................................................................................1207UPDATE..............................................................................................................................1209VACUUM.............................................................................................................................1212VALUES.............................................................................................................................. 1215

    Data Types.................................................................................................................................... 1218Date/Time Types................................................................................................................ 1220Pseudo-Types..................................................................................................................... 1230Text Search Data Types.................................................................................................... 1232Range Types...................................................................................................................... 1234

    Summary of Built-in Functions...................................................................................................... 1239Greenplum Database Function Types................................................................................1239Built-in Functions and Operators........................................................................................1240JSON Functions and Operators......................................................................................... 1243Window Functions.............................................................................................................. 1250Advanced Aggregate Functions......................................................................................... 1252Text Search Functions and Operators............................................................................... 1254Range Functions and Operators........................................................................................ 1258

    Additional Supplied Modules......................................................................................................... 1261auto_explain........................................................................................................................1261citext....................................................................................................................................1262dblink...................................................................................................................................1262diskquota.............................................................................................................................1265fuzzystrmatch...................................................................................................................... 1269gp_sparse_vector................................................................................................................1270hstore.................................................................................................................................. 1274orafce.................................................................................................................................. 1274pageinspect.........................................................................................................................1276pgcrypto.............................................................................................................................. 1276sslinfo.................................................................................................................................. 1277

    Character Set Support...................................................................................................................1278Setting the Character Set...................................................................................................1280Character Set Conversion Between Server and Client...................................................... 1280

    Server Configuration Parameters..................................................................................................1283Parameter Types and Values.............................................................................................1283Setting Parameters............................................................................................................. 1283Parameter Categories.........................................................................................................1284Configuration Parameters...................................................................................................1294

    System Catalogs........................................................................................................................... 1375System Tables.................................................................................................................... 1375System Views..................................................................................................................... 1376System Catalogs Definitions...............................................................................................1377

    The gp_toolkit Administrative Schema..........................................................................................1477Checking for Tables that Need Routine Maintenance........................................................1477Checking for Locks.............................................................................................................1478Checking Append-Optimized Tables.................................................................................. 1480Viewing Greenplum Database Server Log Files................................................................ 1484Checking Server Configuration Files..................................................................................1487

  • Contents Release Notes

    12

    Checking for Failed Segments........................................................................................... 1488Checking Resource Group Activity and Status.................................................................. 1489Checking Resource Queue Activity and Status................................................................. 1493Checking Query Disk Spill Space Usage...........................................................................1495Viewing Users and Groups (Roles)....................................................................................1497Checking Database Object Sizes and Disk Space............................................................ 1497Checking for Uneven Data Distribution.............................................................................. 1501Including Data for Materialized Views................................................................................ 1502

    The gpperfmon Database..............................................................................................................1504database_*.........................................................................................................................1506diskspace_*....................................................................................................................... 1507interface_stats_*................................................................................................................ 1507log_alert_*..........................................................................................................................1509queries_*............................................................................................................................. 1510segment_*..........................................................................................................................1512socket_stats_*.....................................................................................................................1513system_*............................................................................................................................. 1514dynamic_memory_info........................................................................................................ 1516memory_info...................................................................................................................... 1516

    Server Programmatic Interfaces....................................................................................................1518Greenplum Partner Connector API.................................................................................... 1518Developing a Background Worker Process....................................................................... 1537

    SQL Features, Reserved and Key Words, and Compliance........................................................ 1540Summary of Greenplum Features...................................................................................... 1540Reserved Identifiers and SQL Key Words......................................................................... 1550SQL 2008 Optional Feature Compliance........................................................................... 1566

    Chapter 8: Greenplum Client and Loader Tools Package................. 1596

    Chapter 9: About the Tools Package.................................................. 1597

    Chapter 10: Installing the Client and Loader Tools Package............ 1598Supported Platforms......................................................................................................................1599Installation Procedure....................................................................................................................1600About Your Installation.................................................................................................................. 1601Running the UNIX Tools Installer................................................................................................. 1602

    Prerequisites....................................................................................................................... 1602Procedure............................................................................................................................1602

    Running the Windows Tools Installer........................................................................................... 1603Prerequisites....................................................................................................................... 1603Procedure............................................................................................................................1603

    Chapter 11: Configuring Greenplum Database for Remote ClientAccess................................................................................................. 1604

    Chapter 12: Configuring a Client System for KerberosAuthentication.................................................................................... 1605

    Chapter 13: Using the Client and Loader Tools................................. 1606

  • Contents Release Notes

    13

    Prerequisites.................................................................................................................................. 1607Setting Up Your Greenplum Database Clients Runtime Environment.......................................... 1608Running the Client and Loader Programs.................................................................................... 1609Greenplum Database Documentation References........................................................................1610Windows Considerations............................................................................................................... 1611

    Chapter 14: Client and Loader Utility Reference................................1612

    Chapter 15: DataDirect ODBC Drivers for Pivotal Greenplum...........1613Prerequisites.................................................................................................................................. 1614Supported Client Platforms........................................................................................................... 1615Installing on Linux Systems.......................................................................................................... 1616

    Configuring the Driver on Linux......................................................................................... 1617Testing the Driver Connection on Linux.............................................................................1618

    Installing on Windows Systems.................................................................................................... 1620Verifying the Version on Windows..................................................................................... 1620Configuring and Testing the Driver on Windows................................................................1620

    DataDirect Driver Documentation..................................................................................................1622

    Chapter 16: DataDirect JDBC Driver for Pivotal Greenplum............. 1623Prerequisites.................................................................................................................................. 1624Downloading the DataDirect JDBC Driver.................................................................................... 1625Obtaining Version Details for the Driver....................................................................................... 1626Usage Information......................................................................................................................... 1627DataDirect Driver Documentation..................................................................................................1628

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    14

    Chapter 1

    Pivotal Greenplum 6.6 Release Notes

    This document contains pertinent release information about Pivotal Greenplum Database 6.6 releases.For previous versions of the release notes for Greenplum Database, go to Pivotal Greenplum DatabaseDocumentation. For information about Greenplum Database end of life, see Pivotal Greenplum Databaseend of life policy.

    Pivotal Greenplum 6 software is available for download from the Pivotal Greenplum page on PivotalNetwork.

    Pivotal Greenplum 6 is based on the open source Greenplum Database project code.

    Important: Pivotal Support does not provide support for open source versions of GreenplumDatabase. Only Pivotal Greenplum Database is supported by Pivotal Support.

    https://gpdb.docs.pivotal.io/https://gpdb.docs.pivotal.io/https://support.pivotal.io/hc/en-us/articles/201143553-GPDB-software-EOL-policyhttps://support.pivotal.io/hc/en-us/articles/201143553-GPDB-software-EOL-policyhttps://network.pivotal.io/products/pivotal-gpdbhttps://network.pivotal.io/products/pivotal-gpdbhttp://greenplum.org/

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    15

    Release 6.6.0Release Date: 2020-04-06

    Pivotal Greenplum 6.6.0 is a minor release that includes changed features and resolves several issues.

    FeaturesGreenplum Database 6.6.0 includes these new and changed features:

    • For the CREATE EXTERNAL TABLE command, the LOG ERRORS clause now supports thePERSISTENTLY keyword. The LOG ERRORS clause logs information about external table datarows with formatting errors. The error log data is stored internally. When you specify LOG ERRORSPERSISTENTLY, the log data persists after the external table is dropped.

    If you use the PERSISTENTLY keyword, you must install the functions that manage the persistent errorlog information.

    For information about the error log information and built-in functions for viewing and managing error loginformation, see See CREATE EXTERNAL TABLE

    • PXF version 5.11.2 is included, which introduces these changes:

    • PXF no longer validates the JDBC BATCH_SIZE write option during a read operation.• PXF bundles a newer jackson-databind library.• PXF removes references to the unused pxf-public.classpath file. This in turn removes

    spurious WARNING: Failed to read classpath file ... log messages.• PXF now bundles Tomcat version 7.0.100.

    Resolved IssuesPivotal Greenplum 6.6.0 resolves these issues:

    30483 - Query Optimizer

    A query that specified multiple constants in an IN clause generated a large number ofspill files and returned the error workfile per query size limit exceeded whenGPORCA incorrectly normalized a histogram that was not well-defined. This issue isresolved.

    30488 - DLL

    For some append-optimized partitioned tables, performance was poor when adding acolumn to the table with the ALTER TABLE... ADD COLUMN command because thecommand performed a full table rewrite. Now only data corresponding to the new column isrewritten.

    30518 - Query Optimizer

    A query that specified an aggregate function such as min() or count() that was invokedon a citext-type column failed with the error cache lookup failed for function0 because GPORCA incorrectly generated a multi-stage aggregate for the query. Thisissue is resolved.

    30525 - Logging

    In some cases, Greenplum Database encountered a segmentation fault and rotated thelog file early when the logging level was set to WARNING or less severe and Greenplumattempted to write to the alert log file after it failed to open the file. This issue is resolved.

    171506474 - COPY

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    16

    When COPY FROM SEGMENT command copied data into an append-only table, thecommand did not update the append-only table metadata tupcount (the number of tupleson a segment, including invisible tuples) and modcount (the number of data modificationoperations performed). This issue is resolved.

    n/a - gpperfmon

    The Ubuntu build of Greenplum Database 6.5.0 did not include the gpperfmon database,which is required for using Greenplum Command Center. This issue is resolved in version6.6.0.

    Upgrading to Greenplum 6.6.0Note: Greenplum 6 does not support direct upgrades from Greenplum 4 or Greenplum 5 releases,or from earlier Greenplum 6 Beta releases.

    See Upgrading from an Earlier Greenplum 6 Release to upgrade your existing Greenplum 6.x software toGreenplum 6.6.0.

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    17

    Deprecated FeaturesDeprecated features will be removed in a future major release of Greenplum Database. Pivotal Greenplum6.x deprecates:

    • The analzyedb option --skip_root_stats (deprecated since 6.2).

    If the option is specified, a warning is issued stating that the option will be ignored.• The server configuration parameter gp_statistics_use_fkeys (deprecated since 6.2).• The following PXF configuration properties (deprecated since 6.2):

    • The PXF_USER_IMPERSONATION, PXF_PRINCIPAL, and PXF_KEYTAB settings in the pxf-env.sh file. You can use the pxf-site.xml file to configure Kerberos and impersonation settingsfor your new Hadoop server configurations.

    • The pxf.impersonation.jdbc property setting in the jdbc-site.xml file. You can use thepxf.service.user.impersonation property to configure user impersonation for a new JDBCserver configuration.

    • The server configuration parameter gp_ignore_error_table (deprecated since 6.0).

    To avoid a Greenplum Database syntax error, set the value of this parameter to true when yourun applications that execute CREATE EXTERNAL TABLE or COPY commands that include the nowremoved Greenplum Database 4.3.x INTO ERROR TABLE clause.

    • Specifying => as an operator name in the CREATE OPERATOR command (deprecated since 6.0).• The Greenplum external table C API (deprecated since 6.0).

    Any developers using this API are encouraged to use the new Foreign Data Wrapper API in its place.• Commas placed between a SUBPARTITION TEMPLATE clause and its corresponding SUBPARTITION

    BY clause, and between consecutive SUBPARTITION BY clauses in a CREATE TABLE command(deprecated since 6.0).

    Using this undocumented syntax will generate a deprecation warning message.• The timestamp format YYYYMMDDHH24MISS (deprecated since 6.0).

    This format could not be parsed unambiguously in previous Greenplum Database releases, and is notsupported in PostgreSQL 9.4.

    • The createlang and droplang utilities (deprecated since 6.0).• The pg_resqueue_status system view (deprecated since 6.0).

    Use the gp_toolkit.gp_resqueue_status view instead.• The GLOBAL and LOCAL modifiers when creating a temporary table with the CREATE TABLE and

    CREATE TABLE AS commands (deprecated since 6.0).

    These keywords are present for SQL standard compatibility, but have no effect in Greenplum Database.• The Greenplum Platform Extension Framework (PXF) HDFS profile names for the Text, Avro, JSON,

    Parquet, and SequenceFile data formats (deprecated since 5.16).

    Refer to Connectors, Data Formats, and Profiles in the PXF Hadoop documentation for moreinformation.

    • Using WITH OIDS or oids=TRUE to assign an OID system column when creating or altering a table(deprecated since 6.0).

    • Allowing superusers to specify the SQL_ASCII encoding regardless of the locale settings (deprecatedsince 6.0).

    This choice may result in misbehavior of character-string functions when data that is not encoding-compatible with the locale is stored in the database.

    • The @@@ text search operator (deprecated since 6.0).

    This operator is currently a synonym for the @@ operator.

    ../pxf/access_hdfs.html#hadoop_connectors

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    18

    • The unparenthesized syntax for option lists in the VACUUM command (deprecated since 6.0).

    This syntax requires that the options to the command be specified in a specific order.• The plain pgbouncer authentication type (auth_type = plain) (deprecated since 4.x).

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    19

    Migrating Data to Greenplum 6Note: Greenplum 6 does not support direct upgrades from Greenplum 4 or Greenplum 5 releases,or from earlier Greenplum 6 Beta releases.

    See Migrating Data from Greenplum 4.3 or 5 for guidelines and considerations for migrating existingGreenplum data to Greenplum 6, using standard backup and restore procedures.

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    20

    Known Issues and LimitationsPivotal Greenplum 6 has these limitations:

    • Upgrading a Greenplum Database 4 or 5 release, or Greenplum 6 Beta release, to Pivotal Greenplum 6is not supported.

    • MADlib, GPText, and PostGIS are not yet provided for installation on Ubuntu systems.• Greenplum 6 is not supported for installation on DCA systems.• Greenplum for Kubernetes is not yet provided with this release.

    The following table lists key known issues in Pivotal Greenplum 6.x.

    Table 1: Key Known Issues in Pivotal Greenplum 6.x

    Issue Category Description

    30522 Logging Greenplum Database may write a FATAL message to the standbymaster or mirror log stating that the database system is in recoverymode when the instance is synchronizing with the master andGreenplum attempts to contact it before the operation completes.Ignore these messages and use gpstate -f output to determine ifthe standby successfully synchronized with the Greenplum master;the command returns Sync state: sync if it is synchronized.

    30537 PostgresPlanner

    The Postgres Planner generates a very large query plan that causesout of memory issues for the following type of CTE (common tableexpression) query: the WITH clause of the CTE contains a partitionedtable with a large number partitions, and the WITH reference is usedin a subquery that joins another partitioned table.

    Workaround: If possible, use the GPORCA query optimizer. Withthe server configuration parameter optimizer=on, GreenplumDatabase attempts to use GPORCA for query planning andoptimization when possible and falls back to the Postgres Plannerwhen GPORCA cannot be used. Also, the specified type of querymight require a long time to complete.

    171883625 PXF pxf [cluster] init may fail to recognize a new JAVA_HOMEsetting when the value is provided via the shell environment.

    Workaround: Edit $PXF_CONF/conf/pxf-env.sh and manuallyset JAVA_HOME to the new value, run pxf cluster sync tosynchronize this configuration change across the Greenplum cluster,and then re-run pxf [cluster] init.

    170824967 gpfidsts For Greenplum Database 6.x, a command that accesses an externaltable that uses the gpfdists protocol fails if the external tabledoes not use an IP address when specifying a host system in theLOCATION clause of the external table definition.

    n/a MaterializedViews

    By default, certain gp_toolkit views do not display data formaterialized views. If you want to include this information in gp_toolkit view output, you must redefine a gp_toolkit internalview as described in Including Data for Materialized Views.

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    21

    Issue Category Description

    168689202 PXF PXF fails to run any query on Java 11 that specifies a Hive* profiledue to this Hive known issue: ClassCastException when initializingHiveMetaStoreClient on JDK10 or newer.

    Workaround: Run PXF on Java 8 or use the PXF JDBC Connectorto access Hive.

    168957894 PXF The PXF Hive Connector does not support using the Hive* profilesto access Hive transactional tables.

    Workaround: Use the PXF JDBC Connector to access Hive.

    169200795 GreenplumStream Server

    When loading Kafka data into Greenplum Database in UPDATE andMERGE modes, GPSS requires that a MAPPING exist for each columnname identified in the MATCH_COLUMNS and UPDATE_COLUMNS lists.

    170202002 Greenplum-KafkaIntegration

    Updating the METADATA:SCHEMA property and restarting apreviously-run load job could cause gpkafka to re-read Kafkamessages published to the topic, and load duplicate messages intoGreenplum Database.

    168548176 gpbackup When using gpbackup to back up a Greenplum Database 5.7.1 orearlier 5.x release with resource groups enabled, gpbackup returnsa column not found error for t6.value AS memoryauditor.

    164791118 PL/R PL/R cannot be installed using the deprecated createlang utility,and displays the error:

    createlang: language installation failed: ERROR:no schema has been selected to create in

    Workaround: Use CREATE EXTENSION to install PL/R, as describedin the documentation.

    N/A GreenplumClient/LoadTools onWindows

    The Greenplum Database client and load tools on Windows have notbeen tested with Active Directory Kerberos authentication.

    https://issues.apache.org/jira/browse/HIVE-21508https://issues.apache.org/jira/browse/HIVE-21508

  • Pivotal Greenplum 6.6 Release Notes Release Notes

    22

    Differences Compared to Open Source GreenplumDatabase

    Pivotal Greenplum 6.x includes all of the functionality in the open source Greenplum Database project andadds:

    • Product packaging and installation script• Support for QuickLZ compression. QuickLZ compression is not provided in the open source version of

    Greenplum Database due to licensing restrictions.• Support for data connectors:

    • Greenplum-Spark Connector• Greenplum-Informatica Connector• Greenplum-Kafka Integration• Greenplum Stream Server

    • Data Direct ODBC/JDBC Drivers• gpcopy utility for copying or migrating objects between Greenplum systems• Support for managing Greenplum Database using Pivotal Greenplum Command Center• Support for full text search and text analysis using Pivotal GPText• Greenplum backup plugin for DD Boost• Backup/restore storage plugin API (Beta)

    http://greenplum.org/

  • 23

    Chapter 2

    Installing and Upgrading Greenplum

    Information about installing, configuring, and upgrading Greenplum Database software and configuringGreenplum Database host machines.

  • Installing and Upgrading Greenplum Release Notes

    24

    Platform RequirementsThis topic describes the Pivotal Greenplum Database 6 platform and operating system softwarerequirements.

    Important: Pivotal Support does not provide support for open source versions of GreenplumDatabase. Only Pivotal Greenplum Database is supported by Pivotal Support.

    • Operating Systems

    • Software Dependencies• Java

    • Hardware and Network• Storage• Tools and Extensions Compatibility

    • Client Tools• Extensions• Data Connectors• GPText• Greenplum Command Center

    • Hadoop Distributions

    Operating SystemsPivotal Greenplum 6 runs on the following operating system platforms:

    • Red Hat Enterprise Linux 64-bit 7.x (See the following Note.)• Red Hat Enterprise Linux 64-bit 6.x• CentOS 64-bit 7.x• CentOS 64-bit 6.x• Ubuntu 18.04 LTS

    Important: Significant Greenplum Database performance degradation has been observed whenenabling resource group-based workload management on RedHat 6.x and CentOS 6.x systems.This issue is caused by a Linux cgroup kernel bug. This kernel bug has been fixed in CentOS 7.xand Red Hat 7.x systems.

    If you use RedHat 6 and the performance with resource groups is acceptable for your use case,upgrade your kernel to version 2.6.32-696 or higher to benefit from other fixes to the cgroupsimplementation.

    Note: For Greenplum Database that is installed on Red Hat Enterprise Linux 7.x or CentOS 7.xprior to 7.3, an operating system issue might cause Greenplum Database that is running largeworkloads to hang in the workload. The Greenplum Database issue is caused by Linux kernel bugs.

    RHEL 7.3 and CentOS 7.3 resolves the issue.

    Greenplum Database server supports TLS version 1.2 on RHEL/CentOS systems, and TLS version 1.3 onUbuntu systems.

    Software DependenciesGreenplum Database 6 requires the following software packages on RHEL/CentOS 6/7 systems which areinstalled automatically as dependencies when you install the Pivotal Greenplum Database RPM package):

    • apr• apr-util

  • Installing and Upgrading Greenplum Release Notes

    25

    • bash• bzip2• curl• krb5• libcurl• libevent• libxml2• libyaml• zlib• openldap• openssh• openssl• openssl-libs (RHEL7/Centos7)• perl• readline• rsync• R• sed (used by gpinitsystem)• tar• zip

    Greenplum Database 6 client software requires these operating system packages:

    • apr• apr-util• libyaml• libevent

    On Ubuntu systems, Greenplum Database 6 requires the following software packages, which are installedautomatically as dependencies when you install Greenplum Database with the Debian package installer:

    • libapr1• libaprutil1• bash• bzip2• krb5-multidev• libcurl3-gnutls• libcurl4• libevent-2.1-6• libxml2• libyaml-0-2• zlib1g• libldap-2.4-2• openssh-client• openssh-client• openssl• perl• readline• rsync• sed• tar• zip• net-tools

  • Installing and Upgrading Greenplum Release Notes

    26

    • less• iproute2

    Greenplum Database 6 uses Python 2.7.12, wh