How to enable TCP connections to PostgreSQL
Problem statement
By default, the TCP connection to PostgreSQL is disallowed. You would see the following like error when you try to connect.
# su - postgres
-bash-4.2$ psql --host=10.10.10.243 --port=5432 --username=postgres -w -c "\l"
psql: error: connection to server at "10.10.10.