Re: How To Install Extension Via Script File? - Mailing list pgsql-general

From Don Parris
Subject Re: How To Install Extension Via Script File?
Date
Msg-id CAJ-7yonhB7eXHAkvph8e2Y6hoSjrtqknegQ=Wsu8mMxdGqL53Q@mail.gmail.com
Whole thread Raw
In response to Re: How To Install Extension Via Script File?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How To Install Extension Via Script File?  (Quentin Hartman <qhartman@direwolfdigital.com>)
List pgsql-general
On Thu, Aug 8, 2013 at 8:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Don Parris <parrisdc@gmail.com> writes:
> When I try a simple psql -U postgres -W - just to initiate the psql
> session, I get:
> psql: FATAL:  Peer authentication failed for user "postgres"

> It's like my regular user cannot connect as the postgres user.

You're right, it can't, if you've selected peer authentication in
pg_hba.conf.  You'd need to use some other auth method, perhaps
password-based auth, if you want this to work.  Read up on auth methods
in the fine manual.

> However, this works (with me just typing my password for sudo):
> donp@wiesbaden:~$ sudo -u postgres psql -U postgres
> [sudo] password for donp:

Sure, because then psql is launched as the postgres OS user, and peer auth
will let that user connect as the postgres DB user.

                        regards, tom lane

Ahhhh...  now I understand.  Thanks Tom!  That should really help!  I'll check that out.

--
D.C. Parris, FMP, Linux+, ESL Certificate
Minister, Security/FM Coordinator, Free Software Advocate
GPG Key ID: F5E179BE

pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: archive folder housekeeping
Next
From: wd
Date:
Subject: Re: Recovery.conf and PITR