Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

On my system, whoami returns Dan. I run initdb with the --username=PgUser argument. Then as OS user Dan I run pg_ctl start on the newly-initialized cluster, and it gives this output:

LOG:  database system was shut down at 2013-06-13 00:54:33 UTC
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
FATAL:  role "Dan" does not exist
 done
server started

The server appears to have started up normally. I believe the error occurs because it wants me to run pg_ctl as the OS user named PgUser. What I want to know is:

  • Is that belief correct?
  • Is there a way to specify the user as PgUser without using su? I would prefer not to create a new OS user and would like to use a PostgreSQL user with a different username (I'm doing some code refactoring that makes this more convenient).
  • Is the instance I started crippled in some way because I started it as OS user Dan?
share|improve this question

1 Answer 1

up vote 2 down vote accepted

This happens when you run pg_ctl start with the -w (wait) option, because it will try a test connection with a user that does not exist (in your case). But that's not really a problem (except for the confusing error message), because that proves that the server is up.

share|improve this answer
    
Hm-hm, what do you think, is it possible somehow to adjust the error message so that is shows the (non)-severity of the issue? :) –  dezso Jun 13 '13 at 19:58
    
Anything is possible. ;-) Send in a bug. –  Peter Eisentraut Jun 13 '13 at 20:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.