jaunty->karmic server upgrade results in two versions of postgresql installed

Bug #403381 reported by Steve Beattie on 2009-07-23
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bacula (Ubuntu)
Martin Pitt
postgresql-8.3 (Ubuntu)
Martin Pitt
postgresql-common (Ubuntu)
Martin Pitt

Bug Description

Binary package hint: postgresql-8.4

After taking an ubuntu-server jaunty install that had the postgresql
tasksel chosen and then upgrading to karmic, the result is that there
are two versions of postgresql installed post-upgrade:

  | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
  ||/ Name Version Description
  ii postgresql-8.3 8.3.7-1build1 object-relational SQL database, version 8.3
  ii postgresql-8.4 8.4.0-2 object-relational SQL database, version 8.4

I suspect this is not desired behavior.

ProblemType: Bug
Architecture: i386
Date: Thu Jul 23 00:47:44 2009
DistroRelease: Ubuntu 9.10
Package: update-manager-core 1:0.124.5
ProcVersionSignature: Ubuntu 2.6.28-13.45-server
SourcePackage: update-manager
Uname: Linux 2.6.28-13-server i686

Steve Beattie (sbeattie) wrote :
Steve Beattie (sbeattie) wrote :

Martin: I've subscribed you as ttx informs you are handling the postgresql 8.3 -> 8.4 transition.

summary: - jaunty->karmic server upgrade results in to versions of postgresql
+ jaunty->karmic server upgrade results in two versions of postgresql
Thierry Carrez (ttx) wrote :

Martin uploaded the postgresql-8.4 package, I suppose he might have a plan we need to know about :)
Both postgresql-8.3 and postgresql-8.4 source packages build a "postgresql" binary in karmic currently. The "postgresql" task points to the non-versioned binaries.

Martin Pitt (pitti) wrote :

Indeed, postgresql-8.3 is being deprecated in karmic now. I synced the new postgresql-8.3 now which drops the metapackages. I still need to demote it to universe, and update postgresql-common to only support 8.4 in karmic (done in bzr now).

affects: postgresql-8.4 (Ubuntu) → udev (Ubuntu)
Changed in udev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Changed in postgresql-common (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgresql-common - 100.1

postgresql-common (100.1) karmic; urgency=low

  * debian/supported-versions: Only support 8.4 in Ubuntu 9.10. (LP: #403381)

 -- Martin Pitt <email address hidden> Thu, 23 Jul 2009 11:28:30 +0200

Changed in postgresql-common (Ubuntu):
status: Fix Committed → Fix Released
Martin Pitt (pitti) on 2009-07-23
affects: udev (Ubuntu) → postgresql-8.3 (Ubuntu)
Martin Pitt (pitti) wrote :

bacula is the only package in main which directly depends on 8.3, will fix.

Changed in bacula (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
Martin Pitt (pitti) wrote :

postgresql-8.3 demoted to universe now.

So with the p-common fix, you will get a debconf explanation on upgrade which explains how to transition your 8.3 clusters to 8.4 (just as with all previous Ubuntu releases).

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bacula - 2.4.4-1ubuntu6

bacula (2.4.4-1ubuntu6) karmic; urgency=low

  * debian/control: Change build and binary dependencies to PostgreSQL 8.4.
    (LP: #403381)

 -- Martin Pitt <email address hidden> Thu, 23 Jul 2009 11:53:12 +0200

Changed in bacula (Ubuntu):
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

postgresql-8.3 demoted to universe.

Changed in postgresql-8.3 (Ubuntu):
status: In Progress → Fix Released
AiO (aio-launchpad) wrote :

Just to help some people out who ended up in this situation (if you "ignored" the debconf message):

I found a nice little example on how to repair this on http://www.tumblr.com/tagged/server+administration .

1. Stop cluster for 8.4, if it’s running:

    sudo pg_ctlcluster 8.4 main stop

2. Drop the cluster for 8.4

    sudo pg_dropcluster 8.4 main

3. With 8.3 running, run pg_upgradecluster

    sudo pg_upgradecluster -v 8.4 8.3 main

4. If all goes well, cluster for 8.3 can be dropped

    sudo pg_dropcluster 8.3 main

And we are probably back on track with PostgreSQL.

merrithewi (ian-merrithew) wrote :

That list of instructions leaves out how to get 8.3 to start. On my just-upgraded karmic, 8.3 won't run any more. (8.4 runs but I can't log into it, for that matter)

root@merrithewi-desktop:init.d# pg_ctlcluster 8.3 main start
Error: pg_controldata not found, please install postgresql-8.3

I admit I don't know much about postgresql; I was only using it as amarok 1.4's backend. I'd like to either upgrade that database from 8.3 to 8.4 or get 8.3 to run. I assumed the upgrade would leave things in a working state, wrongly as it turned out.

merrithewi (ian-merrithew) wrote :

Nevermind.. I didn't pay enough attention to what the message was telling me. 8.3 really *was* uninstalled; I had seen 8.3 files floating around my system and assumed it was still installed. So I reinstalled it and then all worked as it should.

Don't I feel dumb...

tags: added: iso-testing
elatllat (elatllat) wrote :

On the missing 8.3 install instructions:
(untested for now)

pg_ctlcluster 8.4 main stop
pg_dropcluster 8.4 main
echo -e "\ndeb http://security.ubuntu.com/ubuntu hardy-security main restricted\ndeb-src http://security.ubuntu.com/ubuntu hardy-security main restricted\n">>/etc/apt/sources.list
apt-get update
apt-get install -y postgresql-8.3
#not needed
    #pg_ctlcluster 8.3 main start
# extra backup
    cp -r /var/lib/postgresql/8.3/main $DUMP/copy
    su postgres -c "pg_dumpall -f $DUMP/$MYDB.dump -l $MYDB -U postgres"
pg_upgradecluster -v 8.4 8.3 main
pg_ctlcluster 8.3 main stop
pg_dropcluster 8.3 main
pg_ctlcluster 8.4 main start
apt-get remove -y postgresql-8.3

Thanks to Flannel on irc://chat.freenode.net/#ubuntu

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers