Hi,
I've installed PostgreSQL 9.2 (client and server) on a local Windows desktop and can run pgAdmin to see the postgres database.
However, now I'm trying to install a sample database to have a play with some queries etc...
I'm using psql, connecting to postgres on localhost as the postgres user and running the following command:
postgres# CREATE DATABASE dvdrental;
postgres# pg_restore --dbname=dvdrental --verbose dvdrental.tar
Nothing happens, and in the postgres log I get the following error:
2013-05-30 20:57:07 BST LOG: incomplete startup packet
2013-05-30 20:57:45 BST LOG: could not receive data from client: No connection could be made because the target machine actively refused it.
I've googled this error and it seems that it is probably something to do with my pg_hba.conf file.
I have tried each of the following entries and reloaded the file each time (pg_ctl reload), but to no avail:
# IPv4 local connections:
host all all
255.255.255.255/0 trust
host all all
127.0.0.1/32 trust
host all all
0.0.0.0/0 trust
local all all trust
I also have 'listen_addresses = '*'' in my postgresql.conf file.
Can somebody please put me out of my misery and tell me what the entry should be when trying to access the server from a client on the same host?