pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jimy McDermott <jmcdermott@catbird.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: TCPIP connection on local host using md5
Date: Sun, 14 Oct 2012 16:15:13 -0400
Message-ID: <2603.1350245713@sss.pgh.pa.us> (raw)
In-Reply-To: <CAD444jzLV773Mv9gkj5MKcrcOfzCAzrUz6QRB=i=QvdoCrxxfA@mail.gmail.com>
References: <CAD444jzLV773Mv9gkj5MKcrcOfzCAzrUz6QRB=i=QvdoCrxxfA@mail.gmail.com>

Jimy McDermott <jmcdermott@catbird.com> writes:
> pg_hba.conf:
> # TYPE  DATABASE        USER            ADDRESS                 METHOD

> # "local" is for Unix domain socket connections only
> local   all             all                                     peer
> # IPv4 local connections:
> host    all             all             127.0.0.1/32            ident
> # IPv6 local connections:
> host    all             all             ::1/128                 ident
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> host     all             all             192.168.20.250/32       md5   #
> This line supports the remote connection that works great
> host     all             report          127.0.0.1/32            md5      #
> This line is intended to support the local connection that is failing

pg_hba.conf lines are considered in order, so the second one (with the
ident auth method) is matching the incoming connection before the last
one ever gets considered.  You need to re-order those lines.  The rule
of thumb is "most specific rule first".

			regards, tom lane




view thread (2+ messages)

Message-ID: <2603.1350245713@sss.pgh.pa.us>
Permalink:  ../2603.1350245713@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2603.1350245713@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jmcdermott@catbird.com
  Subject: Re: TCPIP connection on local host using md5
  In-Reply-To: <2603.1350245713@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox