Split and fix creation of test database for postgres CI.