hello,
I've been using postgresql for about a year now, and am pretty
comfortable with the basics, bu there has been something bugging me for
a while now:
I set the METHOD in pg_hba.conf to md5 so that a password is required
from all users, from all hosts.
The only problem is that if the
This is not a PostgreSQL problem, it's the script you are using for
startup that has some problem. The pg_hba method is for connection
stablishment. PostgreSQL will start no matter what you put there.
Startup scripts are usually run as root, and postgresql script should su
to the postgresql user
I am using the default startup script that is supplied with the FreeBSD
port (/usr/local/etc/rc.d/010.pgsql.sh) and enabling it in /etc/rc.d
with -o -i flags so listens on TCP/IP
Also, I should mention that the password I mentioned is NOT the password
for the local (Unix) pgsql account, but
mmmhhh, I have never installed postgresql from the ports. I don´t know
what the script is doing, probably it´s checking that Postgresql
directory is initialized.
Anyway, here is my homemade script, you could replace yours with it (check it first, but it´s quite simple).
My script does not tell
# set defaults
postgresql_enable=${postgresql_enable:-NO}
postgresql_flags=${postgresql_flags:--w -s -m fast}
Try it without the -w ... that's probably causing it to try to connect
with psql.
Alternatively, set up a ~/.pgpass file for the postgres user (which
might be a reasonable thing