After migration: FATAL: role "postgres" does not exist

Recommended Posts



I had some troubles with my array so I did some manual assembly using mdadm.

After that diskstation needed to migrate (keeping all my data and settings) so I did that.

Now everything is quite alright but I noticed that apps that need postgres do not work (mediaserver, downloadstation...).

After some digging I found that /var/log/postgres.log is spammed with 'FATAL:  role "postgres" does not exist '.

Trying to find out what exactly is wrong since "psql -U postgres" gives me the same error.

I tried all the usual logins (root, admin, mediaserver) and all ends with same message.

User postgres is correctly defined in /etc/passwd...


Seems to me that "postgres" user is simply not there and and I can't even create it.

Any ideas what to do? I will post in postgres forum - just thought I try this one first.


Thanks for any pointers!


Share this post

Link to post
Share on other sites

You could try deleting/uninstalling packages that use it and see if reinstalling resets the database/user accounts.

I wonder if its possible that when you were recovering your array some of the commands from that process might have changed accounts or folder ownership etc


Lots of internet threads about this error message, maybe this one may help



Share this post

Link to post
Share on other sites

I already tried reinstalling packages and it didn't help :(

Same with googling around...


The link mentioned either uses user "postgres" that I am missing or

suggest to delete some files which I would like to avoid in order not to 

cause any more damage.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.