wal-e setup issue "Ident authentication failed for user "postgres""

6 views
Skip to first unread message

Johannes Lüdke

unread,
Jan 25, 2019, 9:31:33 AM1/25/19
to wa...@googlegroups.com
Hi,

I am setting up wal-e on a production server. My local proof of concept worked well, but now I get an

```
FATAL: Ident authentication failed for user "postgres" (SQLSTATE 28000)
```

What is the recommended way to fix this? Can I configure which user/password wal-e uses to connect to the db?

Kind regards,
Johannes Lüdke

Daniel Farina

unread,
Jan 29, 2019, 4:12:43 PM1/29/19
to johannes.l...@gmail.com, wal-e
On Fri, Jan 25, 2019 at 6:31 AM Johannes Lüdke <johannes.l...@gmail.com> wrote:
Hi,

I am setting up wal-e on a production server. My local proof of concept worked well, but now I get an

```
FATAL: Ident authentication failed for user "postgres" (SQLSTATE 28000)
```

It means that, for whatever reason, the defaults (which tend to rely on unix sockets and peer authentication, as wal-e is conveniently run as the postgres unix user by default), do not work for you.
 
What is the recommended way to fix this? Can I configure which user/password wal-e uses to connect to the db?

If you can't make the defaults work for some reason (I think you should justify to yourself why that may be, and check pg_hba.conf), you have control over credentials via libpq environment variables. https://www.postgresql.org/docs/current/libpq-envars.html 

Johannes Lüdke

unread,
Jan 30, 2019, 2:52:39 AM1/30/19
to Daniel Farina, wal-e
Thanks!

The steps I would recommend in this case:

- find a setting with which one can connect via `psql`
- within psql, execute `\conninfo\
- use those settings to configure wal-e via env variables

In my case, PGHOST='localhost' did not work, one had to set it to a unix socket file
Reply all
Reply to author
Forward
0 new messages