don't forget to close pg connections