To monitor if each XC component is running, psql is not sufficient because it does not check gtm/gtm_proxy/datanode. Also, psql detection may take time. As discussed in the cluster summit (http://wiki.postgresql.org/wiki/PgCon2012CanadaClusterSummit), watchdog time will be nice for this purpose.
Here's a design of watchdog timer:
For this purpose, need some GUC and GTM/GTM-Proxy configuration parameters to specify
Shmid for each component will be kept in pg_control, gtm.control and gtm_proxy.control files.
API to attach shared memory for watchdog and read the timer value will be provided too.