【Establish database connection】
As long as it is compatible with PostgreSQL client, you can connect to GP. For example: psql
can only connect to master, segment does not accept connections
The connection parameters are as follows:
Connection Parameters | Environment Variables | Default Values | Description
----------------------------------- ------------------------------------
Application name | $PGAPPNAME | psql | Application name
Database name | $ PGDATABASE | template1 | connection database name
Host name | $PGHOST | local host| connection host name, master
Port | $PGPORT | 5432 | port, master
Username | $PGUSER | OS User | login user name
[Supported client applications]
1. The command line
comes with commands, which are stored under $GPHOME/bin:
Command | Description
------------------------ -------------------------------------------------- ------------------
createdb/dropdb | Create or drop new databases
createlang/droplang | Add or drop programming languages, now supports: PL/pgSQL, PL/Perl, PL /Python, PL/Tcl, PL/R
createuser/dropuser | create or delete database roles
psql | PostgreSQL interactive terminal
reindexdb | rebuild database index
vacuumdb | clean database, statistical analysis
(~/.pgpass save user login information, avoid re-entering passwords )
2. The graphical
tool uses pgadminIII, the interface is not bad, can meet the basic requirements
3. Database interface
GP database interface
API | PostgreSQl driver | Download link
-------------------------------------------------- -------------------
ODBC | pgodbc | https://emc.subscribenet.com/
JDBC | pgjdbc | https://emc.subscribenet.com/
Perl DBI | pgperl | http://pgfoundry.org/projects/pgperl/
Python DBI | pypresql | http://www.pygresql.org/
4. Third-party tools
Most third-party ETL and BI tools use standard database interfaces, such as odbc and jdbc. As follows:
* Business Object
* Microstrategy
* Informatica Power Center
* Microsoft SQL Server Integration Services (SSIS) and Reporting Services (SSRS)
* Ascential Datastage
* SAS
* Cognos
[Troubleshooting]
Problem | Solution
--------------------------------------------- ---------------------------------------------
No pg_hba.conf entry for host or user | Check whether pg_hba.conf is configured with permission
Greenplum Database it not running | The database is not started, use gpstate to check the status
Network problems interconnect timeouts | Check whether the network is smooth ping hostname.
| Check whether the master and segment in /etc/hosts are normal.
| 127.0.0.1 should point to localhost
Too many clients already | default max connections is 25,
| Modify the parameter max_connections of postgresql.conf