"I connect using:
sudo -i -u postgres
" This does not connect to Postgres, it creates a login shell as the postgres user. Presumably you then run psql
? Show us that command, please. You shouldn't have to switch to the postgres user to connect to Postgres.