HTTP API tests and PG connection management
Catch already closed PG connections