creates postgres history