package manager, postgresql, pgAdmin3 problems

Questions about applications and software
Forum rules
Before you post please read this

package manager, postgresql, pgAdmin3 problems

Postby grumble on Sun Jun 14, 2009 10:24 pm

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
PATH=/usr/lib/postgresql/8.3/bin:$PATH
export PATH

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
postgres

at the command I get and error, but
psql

works OK.

Any helpful comments or similar stories out there?
grumble
Level 1
Level 1
 
Posts: 2
Joined: Sun Jun 14, 2009 9:10 pm

Linux Mint is funded by ads and donations.
 

Re: package manager, postgresql, pgAdmin3 problems

Postby emorrp1 on Sun Jun 21, 2009 6:04 am

Ok, I'm guessing a bit here, but it's been a week and no-one more knowledgeable has posted, so I'll try my best. I think you're meant to add your user to the postgres group to allow your user access, rather than a specific postgres user. The postgres user's home would be /home/postgres, so it would be there you want to add the PATH export for your postgres user, however the global profile file you found and edited is what you really want, as it should be read by any user who needs it. You could also add it to your own .profile once you've added it to the postgres group. To be sure any settings you change are applied, I'd reboot, just to be sure, but stopping the server while you make the changes, then starting again should be sufficient. If any of this info is useless, I'm sorry.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: package manager, postgresql, pgAdmin3 problems

Postby DrHu on Sun Jun 21, 2009 8:12 am

Installed PostgreSQL, pgadmin3 based on the web page below; Ubuntu community documentation
https://help.ubuntu.com/community/PostgreSQL
--fix up the install, create the user correctly based on the link above, and you should be ok.

PostgreSQL version 8.2 is in synaptic package manager..
User avatar
DrHu
Level 16
Level 16
 
Posts: 6833
Joined: Wed Jun 17, 2009 8:20 pm


Return to Software & Applications

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests