updated with STATHOST env modification to pgstat.c