0 like 0 dislike
56 views

Please log in or register to answer this question.

2 Answers

0 like 0 dislike
answered by (13.2k points)  

The gpstate -pcommand, executed on the Greenplum master, lists the port assignments for the Greenplum master and the primary segments and mirrors. For example:

[gpadmin@mdw ~]$ gpstate -p
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-Starting gpstate with args: -p
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.6.0 build 62994'
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.6.0 build 62994) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Jul 24 2015 11:35:08'
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:--Master segment instance  /data/master/gpseg-1  port = 5432
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:--Segment instance port assignments
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-----------------------------------
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   Host   Datadir                Port
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw1   /data/primary/gpseg0   40000
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw2   /data/mirror/gpseg0    50000
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw2   /data/primary/gpseg1   40000
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw1   /data/mirror/gpseg1    50001
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw3   /data/primary/gpseg2   40000
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw4   /data/mirror/gpseg2    50000
20160126:15:40:22:028389 gpstate:mdw:gpadmin-[INFO]:-   sdw4   /data/primary/gpseg3   40000
20160126:15:40
0 like 0 dislike
answered by (13.2k points)  
If you are  checking for external tables port numbers which are in use.

Use pg_exttable

Related questions

0 like 0 dislike
0 answers
Welcome to PostgreSQL Database Discussion Forum where you can ask questions and receive answers from other members of the community. Can discuss here Oracle, Postgresql, mariadb , mySQL , AWS , Linux , MSSQL , MongoDB , Greenplum databases related queries ...etc.
...