unable to create user postgres: role "postgres" does not exists
Turns out i had installed postgres-xc
and postgresql
on my machine. I had to knock off postgres-xc completely. And it was a little difficult to do that because, there was always an error --purge remove postgres-xc
and the uninstallation could not continue.
There seems to be some kind of a packaging bug. (details on launchpad).
Eventually, i ended up doing this to make it work.
After that i uninstalled postgresql and installed it back to make it work.
Read postgresql tutorial it doesn't matter if it's Ubuntu or other Linux.
EDITbefore creating role or anything else on fresh install you need to create database cluster: have you created it?
initdb -D /usr/local/pgsql/data
You need to be logged as user postgres
on linux machine. Here is more info.