remapped localhost causes connections to localhost to fail using Postgres

From: Dann Corbit <DCorbit(at)connx(dot)com>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: remapped localhost causes connections to localhost to fail using Postgres
Date: 2015-12-04 21:55:23
Message-ID: 87F42982BF2B434F831FCEF4C45FC33EA52E5864@EXCHANGE.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Using a Windows computer, editing the file:
C:\WINDOWS\system32\drivers\etc\hosts
the localhost entry was remapped to the machine name by adding the following line:
127.0.0.1 <Computer-Name>

After this change, Postgres would not allow access using the address localhost.
Only using the machine name to access the database was possible.
Is this by design?

In other words
psql -h localhost
fails, but:
psql -h <Computer-Name>
succeeds.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Moran 2015-12-04 22:16:38 Re: remapped localhost causes connections to localhost to fail using Postgres
Previous Message Michael Paquier 2015-12-04 21:14:07 Re: Support of partial decompression for datums