I had installed Alfresco community edition on and it was running fine. Suddenly I started getting database connection error. Only difference I see is IP address has changed. I could not find out where I had to modify IP address, so I decided to install it from scratch. But while installing I got the below error.

Below are the entries in pg_hba.conf
IPv4 local connections:
host all all 127.0.0.1/32 trust
IPv6 local connections:
host all all ::1/128 trust