Postgresql - Map a Linux user to login
Finally, it comes to end.

The problem is I need to replace the below line. 

local   all             postgres                                peer

 to 

local   all             postgres                                peer  map=root


Thats it, no more changes.

Got this from:

This link