johnkn63 wrote:
>> That's if you started the server with -b.
> now how do I find out how server is starting and how do I change it?
I am
> running 9.1 on debian
Look at the output of "pg_ctl status".
What do you see there?
Actually, the error message would be different in this case, so
I don't think that that's your problem.
>> Can you connect with
>> "psql -h 127.0.0.1 -U nonsuperuser -d database" ?
>
> no,
>
> psql -h 127.0.0.1 -U nonsuperuser -d database
>
> does not work
>
> though of course,
> psql -h 127.0.0.1 -U superuser -d database
> works
This sounds mysterious.
Could you try the following with psql (as superuser):
psql -U postgres -d postgres
postgres=# CREATE ROLE testuser LOGIN PASSWORD 'testpwd';
postgres=# GRANT CONNECT ON DATABASE postgres TO testuser;
postgres=# \q
Then try to connect with
psql -h 127.0.0.1 -U testuser -d postgres -W
and enter the password.
That should not work according to your report.
Now login again as superuser and try:
psql -U postgres -d postgres
postgres=# ALTER USER testuser SUPERUSER;
postgres=# \q
Then see if you can connect as "testuser" as above.
Yours,
Laurenz Albe