How to see active SQL queries and open connections in PostgreSQL/HAWQ

Login to the PostgreSQL command-line interface psql -U [username] [database_name] 2. Run the following query: SELECT datname,usename,procpid,client_addr,waiting,query_start,current_query FROM pg_stat_activity;  


HAWQ logs

Following post will assist you to locate the logs which are required while troubleshooting a HAWQ related analysis. Let's quickly list out the different logs available which are very helpful for troubleshooting. There are primarily 5 logs available: 1. HAWQ Master Logs - Entry to the HAWQ database users from client perspective is via the HAWQ … Continue reading HAWQ logs

HAWQ basics

  #su - gpadmin HAWQ master directory #echo  $MASTER_DATA_DIRECTORY #source /usr/local/hawq-   To see all  segment details execute psql template1 -c "SELECT address, port, role, fse.* FROM gp_segment_configuration, pg_filespace_entry fse WHERE dbid = fse.fsedbid --AND content in (5, 15, 16) --AND fse.fsefsoid = 3052 ORDER BY content, role DESC"   Starting HAWQ Start an initialized … Continue reading HAWQ basics