Fix postgress shutdown (issue quaddra/si#135)