Let's say I have a pg_hba.conf file for my Postgresql server. I know that in order to allow other IP addresses to access my Postgresql server, I need to write their entries in my pg_hba.conf file. Now, what I don't understand is the use of the column USER in the pg_hba.conf file. Lets say my file contains the following entry
host all user123 192.168.10.27/32 md5
According to my understanding, it means that in order to access my Postgresql server from the machine with IP 192.168.10.27, someone needs to be logged in as the user 'user123'. But, as far as i understand, in order to access my Postgresql server from 192.168.10.27, i need to create a separate connection to my server from 192.168.10.27. So even if I am logged in as 'user123', I will be anyways creating a separate connection to access my Postgresql server, which won't depend on whether I am logged in as 'user123' or someone else. Hence, I don't understand the use of USER column. Can someone please help me?