added postgres logging