Thread: Upgrading from 7.2 to 7.4.1 on Redhat 7
Hi, I have owned a server for about a year, and apparently PostgreSQL 7.2 was originally installed with Redhat. I made an attempt to set up a database on the current Postgres setup, but when trying to set up my configure files in WHM (Cpanel) I received the error: Setting up Postgres Config...Done Reloading Postgres...pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid And when I tried to set up a database or user from Cpanel, it just wouldn't work. There wasn't an error, but when I would add a user or database, it wouldn't show up afterwords in my list of users and DBs. So I did some research, and found out about running postmaster in a non-root account. I tried that and recieved this error message: FATAL: The data directory was initialized by PostgreSQL version 7.2, which is not compatible with this version 7.3.3. From that I figured that I must need to update to a more current version of PostgreSQL. I downloaded the .tar.gz for 7.4.1 and followed the instructions, and installed it in my usr/local folder. Everything seemed to compile correctly. I didn't set the "--prefix=PREFIX" command line option, so I assumed it would overwrite all of the files in the /usr/local/pgsql folder. The problem is, that there is no proof that I now have an updated version of PostgreSQL. When I try to use postmaster, I continue to get the same result. I don't know if this is enough information for anyone to be able to help me figure out what is wrong. If not, please let me know what else would be needed as I would really like to get this installed and get working on the database. Thanks so much, Jeremy
Hi Jeremy. Updating major versions (i.e. 7.2 to 7.3 or 7.4) requires you to dump and restore your database. This page explains it: http://www.postgresql.org/docs/7.4/static/install-upgrading.html If you still need some more help, feel free to ask, we're a pretty responsive community.
"Jeremy Smith" <support@xpertleagues.com> writes: > From that I figured that I must need to update to a more current version of > PostgreSQL. I downloaded the .tar.gz for 7.4.1 and followed the > instructions, and installed it in my usr/local folder. Everything seemed > to compile correctly. I didn't set the "--prefix=PREFIX" command line > option, so I assumed it would overwrite all of the files in the > /usr/local/pgsql folder. The problem is, that there is no proof that I now > have an updated version of PostgreSQL. When I try to use postmaster, I > continue to get the same result. It sounds to me like the originally installed postmaster is still running. (That installation will most certainly not be in /usr/local.) You need to stop that postmaster, initdb the 7.4 installation, and start the 7.4 postmaster. You will likely also want to change the initscript that is auto-starting the old postmaster at boot time, so that it autostarts the 7.4 installation instead. On the whole it might be easier to install 7.4 from an RPM, since that way should put the 7.4 installation where the initscript expects to find it. regards, tom lane
Thanks so much Scott, I followed this tutorial (linking it in case anyone has a similar troubles in the future) on installing the RPMs: http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it worked out great! Jeremy -----Original Message----- From: scott.marlowe [mailto:scott.marlowe@ihs.com] Sent: Tuesday, February 10, 2004 5:50 PM To: Jeremy Smith Subject: RE: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 On Tue, 10 Feb 2004, Jeremy Smith wrote: > Hello, > > thank you for this link. But I wonder, do I need to do this if postgres has > never actually been used by any user of this server in the past? Oh, then just uninstall the RPMs, rm -Rf the /var/lib/whereeverpostgresqlputsdata directory and install the new rpms and you're gold.
You're welcome. Glad it all worked for you. If it's any consolation, that's probably the hardest stuff you'll have to deal with in postgresql. do the 7.4.1 rpms include the autovacuum daemon? If so, get it set up to run and you shouldn't have to worry too much about holding postgresql's hand, so to speak. On Tue, 10 Feb 2004, Jeremy Smith wrote: > Thanks so much Scott, > > I followed this tutorial (linking it in case anyone has a similar troubles > in the future) on installing the RPMs: > http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it > worked out great! > > Jeremy > > -----Original Message----- > From: scott.marlowe [mailto:scott.marlowe@ihs.com] > Sent: Tuesday, February 10, 2004 5:50 PM > To: Jeremy Smith > Subject: RE: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 > > > On Tue, 10 Feb 2004, Jeremy Smith wrote: > > > Hello, > > > > thank you for this link. But I wonder, do I need to do this if postgres > has > > never actually been used by any user of this server in the past? > > Oh, then just uninstall the RPMs, rm -Rf the > /var/lib/whereeverpostgresqlputsdata directory and install the new rpms > and you're gold. > > > > >
I actually had to install version 7.4.0 as there weren't any RPMs for 7.4.1 on Redhat 7.3. I am setting up some tables using phpPGadmin right now, and there is a link for "vacuum" so maybe that's it.. Jeremy -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of scott.marlowe Sent: Tuesday, February 10, 2004 7:15 PM To: Jeremy Smith Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 You're welcome. Glad it all worked for you. If it's any consolation, that's probably the hardest stuff you'll have to deal with in postgresql. do the 7.4.1 rpms include the autovacuum daemon? If so, get it set up to run and you shouldn't have to worry too much about holding postgresql's hand, so to speak. On Tue, 10 Feb 2004, Jeremy Smith wrote: > Thanks so much Scott, > > I followed this tutorial (linking it in case anyone has a similar troubles > in the future) on installing the RPMs: > http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it > worked out great! > > Jeremy > > -----Original Message----- > From: scott.marlowe [mailto:scott.marlowe@ihs.com] > Sent: Tuesday, February 10, 2004 5:50 PM > To: Jeremy Smith > Subject: RE: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 > > > On Tue, 10 Feb 2004, Jeremy Smith wrote: > > > Hello, > > > > thank you for this link. But I wonder, do I need to do this if postgres > has > > never actually been used by any user of this server in the past? > > Oh, then just uninstall the RPMs, rm -Rf the > /var/lib/whereeverpostgresqlputsdata directory and install the new rpms > and you're gold. > > > > > ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
Log in as root, then "su - postgres" and type in "pg_autovacuum --help" and see if you get a response from that. If so, the the autovacuum daemon is there, and all you have to do to get it running it its basic format is to run it with 'pg_autovacuum -D'. On Tue, 10 Feb 2004, Jeremy Smith wrote: > I actually had to install version 7.4.0 as there weren't any RPMs for 7.4.1 > on Redhat 7.3. I am setting up some tables using phpPGadmin right now, and > there is a link for "vacuum" so maybe that's it.. > > Jeremy > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of scott.marlowe > Sent: Tuesday, February 10, 2004 7:15 PM > To: Jeremy Smith > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 > > > You're welcome. Glad it all worked for you. If it's any consolation, > that's probably the hardest stuff you'll have to deal with in postgresql. > do the 7.4.1 rpms include the autovacuum daemon? If so, get it set up to > run and you shouldn't have to worry too much about holding postgresql's > hand, so to speak. > > On Tue, 10 Feb 2004, Jeremy Smith wrote: > > > Thanks so much Scott, > > > > I followed this tutorial (linking it in case anyone has a similar troubles > > in the future) on installing the RPMs: > > http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it > > worked out great! > > > > Jeremy > > > > -----Original Message----- > > From: scott.marlowe [mailto:scott.marlowe@ihs.com] > > Sent: Tuesday, February 10, 2004 5:50 PM > > To: Jeremy Smith > > Subject: RE: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 > > > > > > On Tue, 10 Feb 2004, Jeremy Smith wrote: > > > > > Hello, > > > > > > thank you for this link. But I wonder, do I need to do this if postgres > > has > > > never actually been used by any user of this server in the past? > > > > Oh, then just uninstall the RPMs, rm -Rf the > > /var/lib/whereeverpostgresqlputsdata directory and install the new rpms > > and you're gold. > > > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend > > >
scott.marlowe wrote: > Log in as root, then "su - postgres" and type in "pg_autovacuum --help" > and see if you get a response from that. If so, the the autovacuum > daemon is there, and all you have to do to get it running it its basic > format is to run it with 'pg_autovacuum -D'. > > On Tue, 10 Feb 2004, Jeremy Smith wrote: > > > I actually had to install version 7.4.0 as there weren't any RPMs for 7.4.1 > > on Redhat 7.3. I am setting up some tables using phpPGadmin right now, and > > there is a link for "vacuum" so maybe that's it.. There are a number of pg_autovacuum fixes in 7.4.1 so I would use that version in production. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Tuesday 10 February 2004 07:37 pm, Jeremy Smith wrote: > I actually had to install version 7.4.0 as there weren't any RPMs for 7.4.1 > on Redhat 7.3. I am setting up some tables using phpPGadmin right now, and > there is a link for "vacuum" so maybe that's it.. Look in ftp://ftp.postgresql.org/var/spool/ftp/pub/binary/v7.4.1/redhat/redhat-7.3 -- Lamar Owen Director of Information Technology Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 (828)862-5554 www.pari.edu
Thanks Lamar I will try that link later, for some reason it's not coming up now. I tried one of the FTPs off of the postgresql.org site, and the folder for 7.4.1 and Redhat 7.3 was empty. Btw, I have removed my RPM installation of 7.4.0, and my failed attempt at installing 7.4.1 and am now left with a working version of 7.3.3. I am almost tempted to just go ahead and use this verion and give up on all the installing and uninstalling. Is there alot I would be missing out on by not having 7.4.1? I plan on leasing a new server in June that would likely have Red Hat Enterprise on it, and hopefully it would either have an up to date version of postgrese, or no version at all for a clean installation. I have so much work to do on my site that I hate spending valuable time on this.. Jeremy -----Original Message----- From: Lamar Owen [mailto:lowen@pari.edu] Sent: Wednesday, February 11, 2004 4:29 PM To: jer@highboard.com; scott.marlowe Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 On Tuesday 10 February 2004 07:37 pm, Jeremy Smith wrote: > I actually had to install version 7.4.0 as there weren't any RPMs for 7.4.1 > on Redhat 7.3. I am setting up some tables using phpPGadmin right now, and > there is a link for "vacuum" so maybe that's it.. Look in ftp://ftp.postgresql.org/var/spool/ftp/pub/binary/v7.4.1/redhat/redhat-7.3 -- Lamar Owen Director of Information Technology Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 (828)862-5554 www.pari.edu
On Wed, 11 Feb 2004, Jeremy Smith wrote: > Thanks Lamar > > I will try that link later, for some reason it's not coming up now. I tried > one of the FTPs off of the postgresql.org site, and the folder for 7.4.1 and > Redhat 7.3 was empty. > > Btw, I have removed my RPM installation of 7.4.0, and my failed attempt at > installing 7.4.1 and am now left with a working version of 7.3.3. I am > almost tempted to just go ahead and use this verion and give up on all the > installing and uninstalling. Is there alot I would be missing out on by not > having 7.4.1? I plan on leasing a new server in June that would likely have > Red Hat Enterprise on it, and hopefully it would either have an up to date > version of postgrese, or no version at all for a clean installation. I have > so much work to do on my site that I hate spending valuable time on this.. 7.4 generally is vastly superior to 7.3 in many ways. I don't know the differences between 7.4 and 7.4.1 apart from how useful autovacuum is. > -----Original Message----- > From: Lamar Owen [mailto:lowen@pari.edu] > Sent: Wednesday, February 11, 2004 4:29 PM > To: jer@highboard.com; scott.marlowe > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 > > > On Tuesday 10 February 2004 07:37 pm, Jeremy Smith wrote: > > I actually had to install version 7.4.0 as there weren't any RPMs for > 7.4.1 > > on Redhat 7.3. I am setting up some tables using phpPGadmin right now, > and > > there is a link for "vacuum" so maybe that's it.. > > Look in > ftp://ftp.postgresql.org/var/spool/ftp/pub/binary/v7.4.1/redhat/redhat-7.3 > -- > Lamar Owen > Director of Information Technology > Pisgah Astronomical Research Institute > 1 PARI Drive > Rosman, NC 28772 > (828)862-5554 > www.pari.edu > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > -- Sam Barnett-Cormack Software Developer | Student of Physics & Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
On Wed, 11 Feb 2004, Jeremy Smith wrote: > Thanks Lamar > > I will try that link later, for some reason it's not coming up now. I tried > one of the FTPs off of the postgresql.org site, and the folder for 7.4.1 and > Redhat 7.3 was empty. > > Btw, I have removed my RPM installation of 7.4.0, and my failed attempt at > installing 7.4.1 and am now left with a working version of 7.3.3. I am > almost tempted to just go ahead and use this verion and give up on all the > installing and uninstalling. Is there alot I would be missing out on by not > having 7.4.1? I plan on leasing a new server in June that would likely have > Red Hat Enterprise on it, and hopefully it would either have an up to date > version of postgrese, or no version at all for a clean installation. I have > so much work to do on my site that I hate spending valuable time on this.. 7.4 is an incremental improvement over 7.3. If you stick to 7.3, you should at least seek out the latest 7.3 version in RPM format and do a rpm -Uvh postgresql-7.3.5.rpm Well, dangit, I just looked, and it appears the latest 7.3 version available on the postgresql ftp site(s) is 7.3.4, not 7.3.5. Anyone have a link to a 7.3.5 rpm for rh 7.x? 7.4.x has a lot of improvements. If you deinstall the 7.3, 7.4.x should install just fine. but, there's another issue. If the server you'll be migrating to in July will only have 7.3, it is MUCH harder to go backwards on data dumps / imports than it is to go forwards. I.e. if you develop on 7.4, you may find it a bit difficult to export import from 7.4 to 7.3 (or not, I haven't tried going from 7.4 to 7.3) So either make sure your new server can / will have 7.4, or stick to 7.3. I'd recommend upgrading to 7.3.4 for now, and when a set of 7.3.5 rpms comes out upgrade to them. These are "in place" upgrades so you can do them without a dump / restore problem.
Scott, I kept plugging away at it and I now have 7.4.0 installed, and I'm very happy about it :) There were a couple of mistakes that I made, one was in not looking at the order that I was removing the 7.3.3 RPMs. When I would try to remove the wrong one, it would tell me that I couldn't remove it because there were certain files that other RPMs were dependant upon. Once I removed those files, and went back to remove the original, it worked. Once I had 7.3.3 removed, installing 7.4.0 was pretty easy since I realized that the order of my installation of the different files was important. Sorry if I cluttered up the list for the last few days with lots of RPM related problems, but I finally have the whole system figured out to the point that I can at least get by. Thanks for all the help! Jeremy -----Original Message----- From: scott.marlowe [mailto:scott.marlowe@ihs.com] Sent: Thursday, February 12, 2004 9:55 AM To: Jeremy Smith Cc: Lamar Owen; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7 On Wed, 11 Feb 2004, Jeremy Smith wrote: > Thanks Lamar > > I will try that link later, for some reason it's not coming up now. I tried > one of the FTPs off of the postgresql.org site, and the folder for 7.4.1 and > Redhat 7.3 was empty. > > Btw, I have removed my RPM installation of 7.4.0, and my failed attempt at > installing 7.4.1 and am now left with a working version of 7.3.3. I am > almost tempted to just go ahead and use this verion and give up on all the > installing and uninstalling. Is there alot I would be missing out on by not > having 7.4.1? I plan on leasing a new server in June that would likely have > Red Hat Enterprise on it, and hopefully it would either have an up to date > version of postgrese, or no version at all for a clean installation. I have > so much work to do on my site that I hate spending valuable time on this.. 7.4 is an incremental improvement over 7.3. If you stick to 7.3, you should at least seek out the latest 7.3 version in RPM format and do a rpm -Uvh postgresql-7.3.5.rpm Well, dangit, I just looked, and it appears the latest 7.3 version available on the postgresql ftp site(s) is 7.3.4, not 7.3.5. Anyone have a link to a 7.3.5 rpm for rh 7.x? 7.4.x has a lot of improvements. If you deinstall the 7.3, 7.4.x should install just fine. but, there's another issue. If the server you'll be migrating to in July will only have 7.3, it is MUCH harder to go backwards on data dumps / imports than it is to go forwards. I.e. if you develop on 7.4, you may find it a bit difficult to export import from 7.4 to 7.3 (or not, I haven't tried going from 7.4 to 7.3) So either make sure your new server can / will have 7.4, or stick to 7.3. I'd recommend upgrading to 7.3.4 for now, and when a set of 7.3.5 rpms comes out upgrade to them. These are "in place" upgrades so you can do them without a dump / restore problem.
On Thu, 12 Feb 2004, Jeremy Smith wrote: > Scott, > > I kept plugging away at it and I now have 7.4.0 installed, and I'm very > happy about it :) > > There were a couple of mistakes that I made, one was in not looking at the > order that I was removing the 7.3.3 RPMs. When I would try to remove the > wrong one, it would tell me that I couldn't remove it because there were > certain files that other RPMs were dependant upon. Once I removed those > files, and went back to remove the original, it worked. Once I had 7.3.3 > removed, installing 7.4.0 was pretty easy since I realized that the order of > my installation of the different files was important. Sorry if I cluttered > up the list for the last few days with lots of RPM related problems, but I > finally have the whole system figured out to the point that I can at least > get by. Hey, that's why the lists are here. FYI, if you have more than one RPM to remove and they're all interdependent, you can just list them all at once for removal: rpm -e unixODBC-devel-2.2.5-9 unixODBC-2.2.5-9 unixODBC-kde-2.2.5-9 so that if the devel and kde ones are dependent on the main one, they all just go away at once.