added workaround for DBD::Pg losing connections that have been used for asynchronous queries