Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E525C19F3CE for ; Mon, 11 Jun 2012 13:14:56 -0300 (ADT) Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Se7GZ-0007Rh-0P for pgsql-bugs@postgresql.org; Mon, 11 Jun 2012 16:14:55 +0000 Received: by fetter.org (Postfix, from userid 500) id ECEB8803A9; Mon, 11 Jun 2012 09:14:41 -0700 (PDT) Date: Mon, 11 Jun 2012 09:14:41 -0700 From: David Fetter To: Magnus Hagander Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6687: initdb -A ident can almost never be correct Message-ID: <20120611161441.GB5039@fetter.org> References: <20120611160142.GA5039@fetter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201206/105 X-Sequence-Number: 33332 On Mon, Jun 11, 2012 at 06:04:22PM +0200, Magnus Hagander wrote: > On Mon, Jun 11, 2012 at 6:01 PM, David Fetter wrote: > > On Mon, Jun 11, 2012 at 05:51:06PM +0200, Magnus Hagander wrote: > >> On Mon, Jun 11, 2012 at 5:14 PM, =A0 wrote: > >> > The following bug has been logged on the website: > >> > > >> > Bug reference: =A0 =A0 =A06687 > >> > Logged by: =A0 =A0 =A0 =A0 =A0David Fetter > >> > Email address: =A0 =A0 =A0david@fetter.org > >> > PostgreSQL version: 9.1.4 > >> > Operating system: =A0 All > >> > Description: > >> > > >> > When calling initdb -A, it is assumed--wrongly in the case of iden= t, 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 aut= h > > method specified to all default accesses. =A0This is the correct > > behavior for all auth methods except for ident, where it is wrong jus= t > > about everywhere for network (localhost rather than local) access. >=20 > 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. --=20 David Fetter 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