Better order of create pgpass and set environment.