Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to package postgres from one machine to another. The source is windows 7 with IP V6 and target is windows XP with IPv4.

Starting postgres on windows XP gives error

2010-11-01 12:01:07 IST LOG:  invalid IP address "::1": Unknown host
2010-11-01 12:01:07 IST CONTEXT:  line 76 of configuration file "C:/postgres/data/pg_hba.conf"
2010-11-01 12:01:07 IST FATAL:  could not load pg_hba.conf

-- postgres - sharing same pg_hba.conf between IpV4 system and IpV6 system

Here is how my pg_hba.conf looks like


# IPv4 local connections:
host    all         all          trust
# IPv6 local connections:
host    all         all         ::1/128               trust

Is there a way to use same pg_hba.conf common to both ipv6 and ipv4?

share|improve this question
Any chance of an actual question please? – Chopper3 Nov 2 '10 at 14:36
up vote 3 down vote accepted

This is probably not going to work without some installation routine that patches the pg_hba.conf file for the local situation. You could look for existing lines that initdb created in the initial file and just modify those, if necessary. initdb won't put in an IPv6 line if the system doesn't support IPv6.

In PostgreSQL 9.1 (not yet released), you will be able to put host names into pg_hba.conf. So just writing localhost might work on most of your target systems.

share|improve this answer

Just get rid of this line:

host    all         all         ::1/128               trust

If you are on a IPv4-only system the IPv6-loopback address is likely to not be recognized.

share|improve this answer

That solution is not working. Try to add -h in postmaster.opts as parameter. This will disable IPv6 and it should start to work again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.