Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinct

Fixed #columns_for_distinct of postgresql adapter

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md