change pgsql port [duplicate]
Solution 1:
There should be a line in your postgresql.conf
file that says:
port = 1486
Change that.
The location of the file can vary depending on your install options. On Debian-based distros it is /etc/postgresql/8.3/main/
On Windows it is C:\Program Files\PostgreSQL\9.3\data
Don't forget to sudo service postgresql restart
for changes to take effect.
Solution 2:
You can also change the port when starting up:
$ pg_ctl -o "-F -p 5433" start
Or
$ postgres -p 5433
More about this in the manual.