Discussion:
Upgrading from 7.2 to 7.4.1 on Redhat 7
(too old to reply)
Jeremy Smith
2004-02-10 14:45:55 UTC
Permalink
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




---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly
scott.marlowe
2004-02-10 16:42:34 UTC
Permalink
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.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Tom Lane
2004-02-10 16:27:52 UTC
Permalink
Post by Jeremy Smith
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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Jeremy Smith
2004-02-10 22:50:40 UTC
Permalink
Hello Scott,

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?

This is what happened when I tried each step of that page:

2. pg_dumpall > file.txt

I received this error:

pg_dumpall: could not connect to database template1: could not connect to
server
: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

3. kill -INT `cat /usr/local/pgsql/data/postmaster.pid`

postmaster.pid doesn't exist anywhere on my server.

Since all of that failed, I'm not sure if I should move ahead with:

mv /usr/local/pgsql /usr/local/pgsql.old

"After you have installed PostgreSQL 7.4, create a new database directory
and start the new server. Remember that you must execute these commands
while logged in to the special database user account (which you already have
if you are upgrading).

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data"

Thanks for all the help that I have received so far, it is very much
appreciated. :)

Jeremy



-----Original Message-----
From: pgsql-admin-***@postgresql.org
[mailto:pgsql-admin-***@postgresql.org]On Behalf Of scott.marlowe
Sent: Tuesday, February 10, 2004 11:43 AM
To: Jeremy Smith
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7



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.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Jeremy Smith
2004-02-11 00:10:45 UTC
Permalink
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:***@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
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
2004-02-11 00:14:49 UTC
Permalink
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.
Post by Jeremy Smith
Thanks so much Scott,
I followed this tutorial (linking it in case anyone has a similar troubles
http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it
worked out great!
Jeremy
-----Original Message-----
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
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
Jeremy Smith
2004-02-11 00:37:25 UTC
Permalink
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-***@postgresql.org
[mailto:pgsql-admin-***@postgresql.org]On Behalf Of scott.marlowe
Sent: Tuesday, February 10, 2004 7:15 PM
To: Jeremy Smith
Cc: pgsql-***@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.
Post by Jeremy Smith
Thanks so much Scott,
I followed this tutorial (linking it in case anyone has a similar troubles
http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it
worked out great!
Jeremy
-----Original Message-----
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
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



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
scott.marlowe
2004-02-11 00:51:20 UTC
Permalink
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'.
Post by Jeremy Smith
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-----
Sent: Tuesday, February 10, 2004 7:15 PM
To: Jeremy Smith
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.
Post by Jeremy Smith
Thanks so much Scott,
I followed this tutorial (linking it in case anyone has a similar troubles
http://www.lyris.com/lm_help/7.8/installing_postgresql_usin.html and it
worked out great!
Jeremy
-----Original Message-----
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
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
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Bruce Momjian
2004-02-11 19:10:34 UTC
Permalink
Post by scott.marlowe
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'.
Post by Jeremy Smith
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
***@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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly
Lamar Owen
2004-02-11 21:29:02 UTC
Permalink
Post by Jeremy Smith
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 4: Don't 'kill -9' the postmaster
Jeremy Smith
2004-02-11 23:38:50 UTC
Permalink
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:***@pari.edu]
Sent: Wednesday, February 11, 2004 4:29 PM
To: ***@highboard.com; scott.marlowe
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7
Post by Jeremy Smith
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
2004-02-11 23:55:26 UTC
Permalink
Post by Jeremy Smith
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.
Post by Jeremy Smith
-----Original Message-----
Sent: Wednesday, February 11, 2004 4:29 PM
Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7
Post by Jeremy Smith
I actually had to install version 7.4.0 as there weren't any RPMs for
7.4.1
Post by Jeremy Smith
on Redhat 7.3. I am setting up some tables using phpPGadmin right now,
and
Post by Jeremy Smith
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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
scott.marlowe
2004-02-12 14:54:49 UTC
Permalink
Post by Jeremy Smith
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.





---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Jeremy Smith
2004-02-12 15:15:44 UTC
Permalink
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:***@ihs.com]
Sent: Thursday, February 12, 2004 9:55 AM
To: Jeremy Smith
Cc: Lamar Owen; pgsql-***@postgresql.org
Subject: Re: [ADMIN] Upgrading from 7.2 to 7.4.1 on Redhat 7
Post by Jeremy Smith
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.







---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
scott.marlowe
2004-02-12 15:35:40 UTC
Permalink
Post by Jeremy Smith
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.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Loading...