Fix transaction timeouts for postgres

This PR fixes the way pooling is established for postgres. Furthermore transactions are now properly using pooling with both 1 max and 1 min connection. This way transactions are using the pooling's timing configuration.