by kraada » Mon May 04, 2009 1:58 pm
There's a change to pg_hba.conf as well, but that wasn't the change to listen_addresses.
So there's two steps:
(1) Update pg_hba.conf on the server
(2) Update postgres.conf on the server
In (1) you want to click Start --> Programs --> PostgreSQL --> Edit pg_hba.conf.
Add a line at the bottom which is the IP address of the Client (that is the computer that will be connecting). If you're on a local subnet you can add the entire local subnet using CIDR notation: 192.168.1.0/24 will add ALL addresses on the 192.168.1.x subnet. If you want just a specific computer, you would add a.b.c.d/32.
You get this IP address of the client by running ipconfig /all at the command prompt.
Then on the server you edit the postgres.conf and set listen_addresses = '*' meaning "accept incoming connections from all addresses". If you don't do this, PostgreSQL won't accept connections from other than the local machine.
Once both changes are made, save the files and restart the PostgreSQL server and you will be able to connect from your client machine.