confusion about user paring with pg_hba and pg_ident - Mailing list pgsql-general

From arnaud gaboury
Subject confusion about user paring with pg_hba and pg_ident
Date
Msg-id CAK1hC9v8tmyvDxqkWKw6kJu+EnnFwWT-1_p-SQ2M7RYbouOUqg@mail.gmail.com
Whole thread Raw
Responses Re: confusion about user paring with pg_hba and pg_ident  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: confusion about user paring with pg_hba and pg_ident  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I am a little confused about some of my settings when it comes to map linux/psql users.

I have two databases: mattermost and thetradinghall
I have two linux users: mattermost and dovecot. mattermost  is the one who want to talk to mattermost and dovecot  the one who want to talk to thetradinghall.
I have two postresql users: mmuser and mailman.

Here are the relevant part of my config files:

pg_hba.conf
-------------------
 local   thetradinghall      mailman                     peer       map=mailmap
 local   mattermost          mmuser                      peer       map=mattermap

pg_ident.conf
----------------------
  mailmap        dovecot                 mailman
  mattermap      mattermost              mmuser  

* question: can I use same mapname for my both DB, or using two mapnames like I did is the correct way?

Now testing:
-----------------------------
bash-4.3$ whoami
mattermost
bash-4.3$ psql postgres:///mattermost?
psql: FATAL:  no pg_hba.conf entry for host "[local]", user "mattermost", database "mattermost", SSL off
-----------------------------------

I thought my settings told postgres that linux user mattermost was mapped by psql user mmuser (which of course holds the mattermost DB), but it seems it is not the case.
What do I do wrong?

Thank you for help.



pgsql-general by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: Transactional-DDL DROP/CREATE TABLE
Next
From: Vitaly Burovoy
Date:
Subject: Re: ALTER TABLE without long waiting is possibly ?