IPv6 in pg_hba.conf.sample fails here

Started by Tom Laneover 22 years ago4 messages
#1Tom Lane
tgl@sss.pgh.pa.us

Testing a connection that should fail (for lack of pg_hba entry):

$ psql -h sss2 tgl
psql: FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.
$

Say what? This is with a completely default pg_hba.conf file...
looking in the postmaster log as suggested:

LOG: could not interpret IP address "::1" in config file: Unknown server error
LOG: invalid entry in pg_hba.conf file at line 55, token "::1"
FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.

In short, it will not do to put IPv6 addresses into pg_hba.conf
by default on machines where IPv6 support is not present.

While we could gin up some mechanism to adjust the installed copy of
pg_hba.conf.sample depending on whether we detected IPv6 support,
I am inclined to simply remove or comment out the IPv6-specific entry
in the sample file. I doubt that many people actually need it, and
the ones who do can just adjust the sample file.

Comments?

regards, tom lane

#2Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#1)
Re: IPv6 in pg_hba.conf.sample fails here

Yeah, I'd be very surprised if many need it, and those who do can
uncomment it. I think commenting it out is the right thing (tm).

andrew

Tom Lane wrote:

Show quoted text

Testing a connection that should fail (for lack of pg_hba entry):

$ psql -h sss2 tgl
psql: FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.
$

Say what? This is with a completely default pg_hba.conf file...
looking in the postmaster log as suggested:

LOG: could not interpret IP address "::1" in config file: Unknown server error
LOG: invalid entry in pg_hba.conf file at line 55, token "::1"
FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.

In short, it will not do to put IPv6 addresses into pg_hba.conf
by default on machines where IPv6 support is not present.

While we could gin up some mechanism to adjust the installed copy of
pg_hba.conf.sample depending on whether we detected IPv6 support,
I am inclined to simply remove or comment out the IPv6-specific entry
in the sample file. I doubt that many people actually need it, and
the ones who do can just adjust the sample file.

Comments?

regards, tom lane

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Andrew Dunstan (#2)
Re: IPv6 in pg_hba.conf.sample fails here

Agreed. I wanted to put the ipv6 entry in there only if they compiled
with ipv6 suport, but that seemed strange to some, I think.

I would comment it out.

---------------------------------------------------------------------------

Andrew Dunstan wrote:

Yeah, I'd be very surprised if many need it, and those who do can
uncomment it. I think commenting it out is the right thing (tm).

andrew

Tom Lane wrote:

Testing a connection that should fail (for lack of pg_hba entry):

$ psql -h sss2 tgl
psql: FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.
$

Say what? This is with a completely default pg_hba.conf file...
looking in the postmaster log as suggested:

LOG: could not interpret IP address "::1" in config file: Unknown server error
LOG: invalid entry in pg_hba.conf file at line 55, token "::1"
FATAL: missing or erroneous pg_hba.conf file
HINT: See postmaster log for details.

In short, it will not do to put IPv6 addresses into pg_hba.conf
by default on machines where IPv6 support is not present.

While we could gin up some mechanism to adjust the installed copy of
pg_hba.conf.sample depending on whether we detected IPv6 support,
I am inclined to simply remove or comment out the IPv6-specific entry
in the sample file. I doubt that many people actually need it, and
the ones who do can just adjust the sample file.

Comments?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: IPv6 in pg_hba.conf.sample fails here

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Agreed. I wanted to put the ipv6 entry in there only if they compiled
with ipv6 suport, but that seemed strange to some, I think.

I would comment it out.

Done.

regards, tom lane