pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6687: initdb -A ident can almost never be correct
Date: Mon, 11 Jun 2012 09:14:41 -0700
Message-ID: <20120611161441.GB5039@fetter.org> (raw)
In-Reply-To: <CABUevEybKDBRj7JT0KVcombe5V9GY-F9Ab5bWy4QeyaEb+aAOw@mail.gmail.com>
References: <E1Se6KK-0008LJ-MY@wrigleys.postgresql.org>
	<CABUevEwdj-3TrEuTAG7DEie5uxKiF-OXF3v+0J4SdSAH=Bqdwg@mail.gmail.com>
	<20120611160142.GA5039@fetter.org>
	<CABUevEybKDBRj7JT0KVcombe5V9GY-F9Ab5bWy4QeyaEb+aAOw@mail.gmail.com>

On Mon, Jun 11, 2012 at 06:04:22PM +0200, Magnus Hagander wrote:
> On Mon, Jun 11, 2012 at 6:01 PM, David Fetter <david@fetter.org> wrote:
> > On Mon, Jun 11, 2012 at 05:51:06PM +0200, Magnus Hagander wrote:
> >> On Mon, Jun 11, 2012 at 5:14 PM,  <david@fetter.org> wrote:
> >> > The following bug has been logged on the website:
> >> >
> >> > Bug reference:      6687
> >> > Logged by:          David Fetter
> >> > Email address:      david@fetter.org
> >> > PostgreSQL version: 9.1.4
> >> > Operating system:   All
> >> > Description:
> >> >
> >> > When calling initdb -A, it is assumed--wrongly in the case of ident, that
> >> > every method is valid for both local and network.
> >>
> >> Um, what do you mean?
> >>
> >> If I specify initdb -A, it gives me peer on local and ident on tcp, is
> >> that not what you expected?
> >>
> >> Or maybe I'm misunderstanding the problem completely.. What is
> >> happening, and what are you expecting to happen?
> >
> > We have a design issue, namely that initdb -A blindly applies the auth
> > method specified to all default accesses.  This is the correct
> > behavior for all auth methods except for ident, where it is wrong just
> > about everywhere for network (localhost rather than local) access.
> 
> Uh, what *would* you expect to happen if you choose "ident"? That
> something different than what you choose is done?

I'd expect it to error out because it's trying to apply ident to
things which to an excellent approximation can never work, namely
localhost (ipv4 and ipv6 versions).  That this misbehavior is
long-standing doesn't make it correct.

This came up in IRC with someone trying to create automated deployment
scripts using initdb -A and then connecting to localhost instead of
local.  You could argue that this is pilot error, but it's a perfectly
reasonable thing for someone new to try, but there is nothing to
indicate the source of the problems he's seeing.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



view thread (8+ messages)  latest in thread

Message-ID: <20120611161441.GB5039@fetter.org>
Permalink:  ../20120611161441.GB5039@fetter.org/
Also on:    postgresql.org/message-id/20120611161441.GB5039@fetter.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: david@fetter.org, magnus@hagander.net
  Subject: Re: BUG #6687: initdb -A ident can almost never be correct
  In-Reply-To: <20120611161441.GB5039@fetter.org>
  References: <E1Se6KK-0008LJ-MY@wrigleys.postgresql.org> <CABUevEwdj-3TrEuTAG7DEie5uxKiF-OXF3v+0J4SdSAH=Bqdwg@mail.gmail.com> <20120611160142.GA5039@fetter.org> <CABUevEybKDBRj7JT0KVcombe5V9GY-F9Ab5bWy4QeyaEb+aAOw@mail.gmail.com> <20120611161441.GB5039@fetter.org>

* 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