h1.  Security Configuration 
A good configuration for {code}/etc/postgresql/pg_hba.conf{code} and DSpace might be:
{{{
# TYPE  DATAASE    USE        IP-ADDESS        IP-MASK           METHOD
local   all         postgres                                        ident sameuser
local   all         all                                             ident sameuser
host    all         all         127.0.0.1         255.255.255.255   password
host    all         all         ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        password
host    all         all         ::ffff:127.0.0.1/128                password
host    all         all         0.0.0.0           0.0.0.0           reject
}}\}
This allows users to access their own databases on the local machine using sockets (ie. not tcp/ip). However, for the DSpace installation we want to connect over the network, and while we'll authenticate as the DSpace user, we won't *be* the DSpace user.
So, to create the DSpace database, you might have to use the following:
{code}createdb -U dspace -E UNICODE dspace -h localhost{code}
The {code}-h localhost{code} bit specifies that the PostgreSQL createdb command should connect to the local machine over tcp/ip.