This article is half-done without your Comment! *** Please share your thoughts via Comment ***
When you are installing PostgreSQL first time, the default port is 5432.
But when you install another PostgreSQL server on the same server, for this another installation port will be change.
In open forums, I found this kind of questions like If we have multiple PostgreSQL Servers, how to differentiate PostgreSQL Server of a single Linux/Windows server.
The answer is straightforward which is PostgreSQL Port number.
If you want to change your default port number, you can modify the value of “port” parameter in postgresql.conf.
After this change, PostgreSQL service requires to restart.
Now next question, If we installed multiple PostgreSQL servers, how to connect a particular PostgreSQL Server.
You can connect a particular PostgreSQL Server by specifying Port number.
psql -l -p port_number -d database_name