Fix postgress shutdown (issue quaddra/engage#135)