Thread: postgreSQL not working after upgrade to Ubuntu 10.4

postgreSQL not working after upgrade to Ubuntu 10.4

From
AllieH
Date:
Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has caused
me serious problems with everything related to postgreSQL. It seems as
though the new version of ubuntu is requiring me to use PostgreSQL 8.4
instead of 8.3 which I was previously using. I tried installing 8.4 but I
can't seem to get the database to start. Has anyone had a similar problems?
--
View this message in context:
http://old.nabble.com/postgreSQL-not-working-after-upgrade-to-Ubuntu-10.4-tp28488130p28488130.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
Alan Hodgson
Date:
On Friday 07 May 2010, AllieH <allison.hoch@ll.mit.edu> wrote:
> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has
>  caused me serious problems with everything related to postgreSQL. It
>  seems as though the new version of ubuntu is requiring me to use
>  PostgreSQL 8.4 instead of 8.3 which I was previously using. I tried
>  installing 8.4 but I can't seem to get the database to start. Has anyone
>  had a similar problems?
>

Major OS version upgrades don't transparently do database upgrades. You have
to take care of things like that yourself.

In particular, for PostgreSQL, you would need to dump all your databases
using 8.3, then upgrade, then create a new 8.4 installation and restore the
databases into it. Sadly PostgreSQL does not do in-place major version
upgrades.

In your case, you need to stop and make a couple good filesystem-level
backups of your database. Then you need to find a way to either get 8.3
working on that machine, or move the database to another machine where you
can get it working, so you can do the PostgreSQL backup. Then you can think
about getting 8.4 setup on your upgraded machine and restore that backup
into it. You should probably also read through the 8.4 release notes to see
if you will require changes in any applications using those databases.


--
"No animals were harmed in the recording of this episode. We tried but that
damn monkey was just too fast."

Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
Steve Crawford
Date:
AllieH wrote:
> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has caused
> me serious problems with everything related to postgreSQL. It seems as
> though the new version of ubuntu is requiring me to use PostgreSQL 8.4
> instead of 8.3 which I was previously using. I tried installing 8.4 but I
> can't seem to get the database to start. Has anyone had a similar problems?
>
Probably, depending on method of upgrade.

Try looking at the output of:
ls /etc/postgresql
ls /etc/init.d/postgresql*
ls /var/lib/postgresql

If you did a basic upgrade you may find that both versions are installed
and you just have to start the old one (then do your dumps so you can
upgrade). Alternately, you may want to use the
/usr/bin/pg_upgradecluster script that is typically available on Ubuntu
and (usually, in reasonably vanilla cases) does the upgrade for you. In
all cases, do your best to get a backup, first.

Cheers,
Steve


Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
Steve Clark
Date:
On 05/07/2010 12:10 PM, AllieH wrote:
>
> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has caused
> me serious problems with everything related to postgreSQL. It seems as
> though the new version of ubuntu is requiring me to use PostgreSQL 8.4
> instead of 8.3 which I was previously using. I tried installing 8.4 but I
> can't seem to get the database to start. Has anyone had a similar problems?
You are probably going to have to do an initdb. 8.4 db is not compatible
  8.3 db.
I ran into this with Fedora when they went from 8.3 to 8.4 in the middle of
the life of Fedora 12 - luckily I had been doing daily pg_dumps so all I had
to do was initdb under 8.4 and psql < my backup.
--
Stephen Clark
NetWolves
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark@netwolves.com
www.netwolves.com

Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
AllieH
Date:
Thanks for all the help - I needed to an initdb and then I also had to do:

sudo dpkg -i /var/cache/pat/archives/postgresql-client-8.4_8.4.3-1_i386.deb

but it's finally working!! Now I just have to get all my data back but after
this headache I think that will be comparatively easy!

Thanks for all the help!

Allie


Steve Crawford wrote:
>
> AllieH wrote:
>> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has
>> caused
>> me serious problems with everything related to postgreSQL. It seems as
>> though the new version of ubuntu is requiring me to use PostgreSQL 8.4
>> instead of 8.3 which I was previously using. I tried installing 8.4 but I
>> can't seem to get the database to start. Has anyone had a similar
>> problems?
>>
> Probably, depending on method of upgrade.
>
> Try looking at the output of:
> ls /etc/postgresql
> ls /etc/init.d/postgresql*
> ls /var/lib/postgresql
>
> If you did a basic upgrade you may find that both versions are installed
> and you just have to start the old one (then do your dumps so you can
> upgrade). Alternately, you may want to use the
> /usr/bin/pg_upgradecluster script that is typically available on Ubuntu
> and (usually, in reasonably vanilla cases) does the upgrade for you. In
> all cases, do your best to get a backup, first.
>
> Cheers,
> Steve
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context:
http://old.nabble.com/postgreSQL-not-working-after-upgrade-to-Ubuntu-10.4-tp28488130p28489311.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
Steve Clark
Date:
On 05/07/2010 01:22 PM, Alan Hodgson wrote:
> On Friday 07 May 2010, AllieH<allison.hoch@ll.mit.edu>  wrote:
>> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has
>>   caused me serious problems with everything related to postgreSQL. It
>>   seems as though the new version of ubuntu is requiring me to use
>>   PostgreSQL 8.4 instead of 8.3 which I was previously using. I tried
>>   installing 8.4 but I can't seem to get the database to start. Has anyone
>>   had a similar problems?
>>
>
> Major OS version upgrades don't transparently do database upgrades. You have
> to take care of things like that yourself.
Yes but the install procedure should be smart enough to look and see if you are using a previous
version of Postgres and prompt you if you want to continue installing the
new database.

>
> In particular, for PostgreSQL, you would need to dump all your databases
> using 8.3, then upgrade, then create a new 8.4 installation and restore the
> databases into it. Sadly PostgreSQL does not do in-place major version
> upgrades.
>
> In your case, you need to stop and make a couple good filesystem-level
> backups of your database. Then you need to find a way to either get 8.3
> working on that machine, or move the database to another machine where you
> can get it working, so you can do the PostgreSQL backup. Then you can think
> about getting 8.4 setup on your upgraded machine and restore that backup
> into it. You should probably also read through the 8.4 release notes to see
> if you will require changes in any applications using those databases.
>
>


--
Stephen Clark
NetWolves
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark@netwolves.com
www.netwolves.com

Re: postgreSQL not working after upgrade to Ubuntu 10.4

From
Yeb Havinga
Date:
AllieH wrote:
> Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has caused
> me serious problems with everything related to postgreSQL. It seems as
> though the new version of ubuntu is requiring me to use PostgreSQL 8.4
> instead of 8.3 which I was previously using. I tried installing 8.4 but I
> can't seem to get the database to start. Has anyone had a similar problems?
>
Maybe this could have been prevented by 'holding' (in aptitude press '='
on the packages to hold at current level) the postgresql package at the
current level.

Btw: it is possible to mix packages from multiple versions - you might
be able to install the 8.3 again by adding "jaunty" back to
/etc/apt/sources.list (not replace lucid but just add jaunty), run
"apt-get update", then find the package "postgresql" in the aptitude
tool, and press 'v': you then get all the versions available. Select the
8.3 version, press '+' and 'g'. I just verified this on a test fresh
10.4 installation and after 'g' I get no conflicts at all, however, 9.10
(karmic) does not have postgres 8.4, but 9.04 (jaunty) does.

regards,
Yeb Havinga