Merge "Various test fixes for postgres"