how to change postgresql listening port

Just change the setting in the file postgresql.conf (can be found in the data directory):

…./Postgres/9.1/data/postgresql.conf

port = 5433             # (change requires restart)

Remote access can be given by changing pg_hba.conf, just add the ip-address. You also have to edit postgresql.conf:

listen_addresses = '*'

3 Responses so far.

  1. Carl Wiltz says:
    Thank you for another informative web site. Where else could I get that kind of info written in such a perfect way? I’ve a project that I am just now working on, and I have been on the look out for such info.
  2. Marlee says:
    I told my grnamdother how you helped. She said, “bake them a cake!”

LEAVE A COMMENT