October 17th, 2012, 09:53 PM
Pg_hba best practices?
I am in the process of testing a new application using a new development platform (to me, anyway). For this test, I'm creating a runtime version of the application which includes our program logic and an embedded version of Postgres. Along with Postgres comes the pg_hba file, which, when run on an older PC running Windows XP, generates this error in the postgres log.....
LOG: invalid IP address "::1": Unknown host
CONTEXT: line 82 of configuration file "C:/WA4Beta/database/pg_hba.conf"
FATAL: could not load pg_hba.conf
The end of the pg_hba file looks like this....
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
It's that last line for IPv6 that is causing the problem, and if I comment out that line, everything is ok. But, I'm unclear as to whether that line should be left out, or needs to be there, and the fix is actually somewhere else. Other testers running newer versions of Windows do not show this error.
Any guidance would be appreciated.
Thanks and have a good day.