Some tests may test migrations and change the types of columns. If this
happens, Rails may cache a statement that will cause PostgreSQL to fail with
the message, "cached plan must not change result type":
https://github.com/rails/rails/issues/12330
This happened in https://gitlab.com/gitlab-org/gitlab-ee/issues/2890#note_34636077.
The ActiveRecord PostgreSQL adapter does not have a 'socket' option;
see:
https://github.com/rails/rails/blob/4-1-2/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L20