1

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?

1 Answer 1

2

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.

3
  • 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? :) Commented Jun 13, 2013 at 19:58
  • Anything is possible. ;-) Send in a bug. Commented Jun 13, 2013 at 20:42
  • Probably even better would be to use the actual Specified initial user (PgUser)
    – eckes
    Commented Jun 16, 2019 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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