Hi Good People,
I recently installed postgresql using synaptic package manager and have run into a few problems.
What would be really nice, would be if synaptic installed and configured postgresql for me, and recorded everything in a log file, so I could look-up what it did (anyone?). Unfortunately, this is not what happens, and I have to do a fair bit of post-installation configuration myself. The problem with this is that I'm not sure how much (and precisely what) synaptic has done for me. It seems its got man paths sorted nicely, so I can use man to lookup postgresql commands. Nice (not sure how this was achieved however). Unfortunately it did not create the "postgres" user for me, nor did it set $PATH to point to the postgresql commands, nor did it setup the required "data" directory, and tell postgres where it is. OK, so I create "postgres" and set up the data directory. OK, now I can use
sudo su postgres
to change to the postgres user, and I can start postgresql from the command line and enter SQL commands etc. Nice.
OK, now I want to add a path to $PATH so that I can easily invoke postgresql commands. For some reason, the $HOME directory of postgres is /var/lib/postgresql
There is no ".bash_proflie" file there. I create one, and add
to it, but this has no effect. OK, so I edit /etc/profile and add similar commands to the end of that. This changes $PATH for my normal login, but when I sudo su postgres, $PATH is reset. I wonder if I should delete and recreate the postgres user, but I wonder if the new postgres will still own the directories owned by the old postgres!?!? I guess this would be a security problem if so!?
I also want to use pgAdmin3 (and other apps) with my database. I install pgAdmin3 using synaptic, but it tells me it can't connect to the database with the message.
FATAL: Ident authentication failed for user "postgres"
it tells me, really helpfully, that
"If this message appears, the pg_hba.conf entry found for your client / user / database combination is set to "ident" authentication. Some distributions, e.g. Debian, have this by default.... For a beginner, it might be more appropriate to use a different authentication method; MD5 encrypted passwords are a good choice, which can be configured by an entry in pg_hba.conf..."
Nice. Unfortunately changes to pg_hba.conf seem to have no effect. BTW, should I be starting the database server before I start pgAdmin3, or should it take care of that itself? I note that, when I use
at the command I get and error, but
Any helpful comments or similar stories out there?