Pulling out postgresql task/handler