how to change postgresql listening port in windows?

goh picture goh · Jun 3, 2010 · Viewed 41.1k times · Source

How do i change the default listening port 5432 of postgresql to another number?

Another question,

What steps do i have do to allow remote r/w access to the database using python pyscopg2?

Answer

Frank Heikens picture Frank Heikens · Jun 3, 2010

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

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 = '*'