pg_hba behavior

From: "David Parker" <dparker(at)tazznetworks(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_hba behavior
Date: 2004-09-23 13:26:13
Message-ID: 07FDEE0ED7455A48AC42AC2070EDFF7C0C01EF@corpsrv2.tazznetworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We ran into a problem with pg_hba processing recently when we upgraded
from 7.3.2 to 7.4.5. We use postgres as part of a network appliance that
runs on Solaris 9/intel boxes. 7.4.5 runs fine in our development
environment, but when we deploy it to a production box, we get a
"missing or erroneous pg_hba.conf file" error.

The error in the log is
"invalid entry in pg_hba.conf file at line 60, token 255.255.255.255"
which corresponds to the default line included with the pg_hba.conf that
gets built:
host all all 127.0.0.1 255.255.255.255
trust

I traced this to hba.c, and it looks like the main diff in this area
between 7.3.2 and 7.4.5 is that the call to getaddrinfo() has been
added. We wrote a quick test program to just call getaddrinfo() passing
it 255.255.255.255, and ran it on our dev and production platforms. On
the dev platform it returns 0, but on our production platform it returns
EAI_NONAME.

The big difference in the platforms is that DNS is not enabled on the
production box - everything is resolved through etc/hosts. I assume this
is the root of the problem.

I realize that, having traced it to getaddrinfo(), this is not *really*
a postgres issue, but I wonder if anybody has run into this before, and
if so what the solution is. It seems that a value of 0.0.0.0 works, but
I want to understand what's going on before I start whacking away at the
pg_hba.conf (or the etc/hosts, for that matter).

- DAP
======================================================
David Parker Tazz Networks (401) 709-5130

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-09-23 13:54:24 Re: v8 on AIX5.2
Previous Message Jeff Amiel 2004-09-23 13:00:52 Re: using database for queuing operations?