Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to upgrade postgresql.
I have mandrake 9.0 which came with pgsql7.2.2
I've downloaded, unzipped, compiled and installed postgresql 7.3.3
I can run it from /usr/local/pgsql/bin
I even compiled PHP to use it.
My only problem is that the old version 7.2.2 runs on boot.
I followed the instructions on installing at postgresql.org but I found nothing to help me switch which version runs at boot.
my postgres user's home directory is still /var/lib/pgsql
Where have I gone wrong and what can I do to fix this?
I think my problem is similar. Under RH 8, I upgraded PGSQL 7.2.2 to 7.3.2. It has been more difficult to get into it ever since. Sometimes it appears that it may have started under Server|Services. How can I reset that to refer to the proper partition?
Since a disorderly shutdown last night (caused by something else entirely) I can't get into PGSQL at all, and when I try, all command line functions slow down. Sometimes I have to leave the computer for several minutes even to log out.
From upgrade until last night, I have been getting in by using pg_ctl -D /var/lib/pgsql/data start.
I finally copied all my data to another directory, not having succeeded at that time in using pg_dump/pg_dumpall, and reinstalled. It works, but I have no access to existing data (in ../data/base). I had backed everything up to text files using COPY so still have the data but have to go through rebuilding all the tables before I can use anything. Is there a better solution, besides using pg_dump next time (which I subsequently found out how to do)?
Responding directly to one of Pete's questions, since I got a version conflict when trying to use pg_dump, I did a find on pg_dump and compared dates. Then I copied the newer version of all pg_* files over the older ones.
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
I had the exact same problem because my RH 8 came with 7.2 and I went to 7.3 so I could use PGADMINIII on my winXP box.
I found the problem for me was that RedHat uses the old style installation directories for Postgres and when you download the new version of Postgres from the postgres website, it installs in a different directory set. The solution for me was to manually erase the old postgres setup. This was not as hard as I thought it would be because the directory structure for the old postgres is well-documented.
Basically I did something like this (warning**going from memory here):
The new style use /usr/local/pgsql/data as the data directory
The old style used /var/lib/pgsql/data
So I erased the /var/lib/pgsql/data folder along with /var/lib/pgsql folder.
RedHat will still execute the old binaries though because the default location for a RedHat postgres install is
while the "website download" version of postgres installs its binaries in
To fix this, I
ls -l /usr/local/pgsql/bin
to get a complete list of the binaries that comes with postgres. Then I went to the /usr/bin directory and erased each program(VERY CAREFULLY) that matched up.
In other words, because RH installs those binaries in one folder and the "downloaded" postgres in another, you literally have two copies of everything. So why does the old version run? Probably because /usr/bin is in your search path and /usr/local/pgsql/bin is not. So if you just type in pg_ctl its going to hit the old one in /usr/bin.
Once this is done, I set up the variables in my /etc/profile to ensure the correct version of postgres was being used. For me these were:
I deleted all the old stuff and reloaded 7.3.3 (tried 7.3.4 first but had a lib problem). Now it starts automatically and runs but when I try pg_dump or pg_dumpall from
error while loading shared libraries: libpq.so.3:
cannot open shared object file: No such file or directory
Searching for libpq.so.3 (the same one that kept me from installing 7.3.4):
I can now only back up by using COPY to a text file, which leads to problems when reinstalling, if that becomes necessary (no schema, for one thing).
Thanks. I did try adding to /35c/ld.so.conf and running /sbin/lcdonfig. But before I did that I rebooted because I could no longer log on as my self; only as postgres and root. I added a new user and deleted myself (keeping my /home dir for the new user) and had the same problem. Pgsql didn't come back up automatically, but I ran postgres -D /usr/local/pgsql/date start and that did it. But if I log on as postgres and try su, it seems to hang up on password, yet if I deliberately enter a wrong password it comes back in a reasonable time (2 sec., maybe) with "incorrect password."
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
On my system, it is in:
Here is a link to download the postgresql client shared libraries. At the bottom of the list, you will also notice they have documented where the libraires are stored by default. There is also some documentation on why you need the library in the first place.