Tuesday, March 22, 2011

Setting up PostgreSQL for Windows - (3) Changing port

Just realized that the PostgreSQL installer used port 5433.
I changed it to 5432.

(1) Edit postgresql.conf
...
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------

# - Connection Settings -

listen_addresses = '*'  # what IP address(es) to listen on;
                        # comma-separated list of addresses;
                        # defaults to 'localhost', '*' = all
                        # (change requires restart)
port = 5432             # (change requires restart)
max_connections = 100   # (change requires restart)
                        # Note:  Increasing max_connections costs ~400 bytes of shared memory per 
                        # connection slot, plus lock space (see max_locks_per_transaction).
...

(2) Restart the server
Stop and Start PostgreSQL service.

(3) Update connection entry for pgAdmin III.
Delete the old one (with 5433) and add new one (with 5432).

No comments:

Post a Comment