do not automatically remove postgresql-* on dist upgrades

Bug #202548 reported by Daniel Botelho
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-8.3 (Ubuntu)
Invalid
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

Binary package hint: postgresql

Hello!

Today I've upgrade from 7.10 to 8.04, just by typing in the console:
$ gksudo "update-manager -d"
I had no troubles and now I'm running 8.04 version and everything is working as it should.

Anyway, in this upgrade I had also to upgrade my postgreSQL version. The problem is that when upgrading the database I've lost everything from the previous database in the previous version.
Anyway this could be avoided if only I've followed the upgrade instructions in http://www.postgresql.org/docs/8.3/interactive/install-upgrading.html ...
My question is that, when upgrading from the repositorie couldn't/shouldn't the upgrade manage to backup all the existing data and after upgrading restore it?

Best regards

Revision history for this message
Martin Pitt (pitti) wrote :

I don't think that you lost your database entirely. Without knowing what you did exactly, I think this happened:

  postgresql-8.2 is not supported in Ubuntu 8.04 any more, so update-manager suggested to remove the old postgresql-8.2 since it is in universe now. I take it you accepted this?

Without postgresql-8.2 installed, you cannot access/update your database any more.

You should install postgresql-8.2 again and verify that your 8.2 DB is present in "pg_lsclusters". Is it?

Changed in postgresql:
status: New → Invalid
Changed in postgresql-8.3:
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Since PostgreSQL updates are quite special, and it is not the first time I saw someone tripping over this, it would be great if we could leave old postgresql packages installed on upgrade. postgresql-common produces its own debconf notes about the upgrade, and older versions being unsupported/obsolete, and also provides instructions how to properly upgrade the database.

Changed in postgresql:
status: Invalid → New
Revision history for this message
Martin Pitt (pitti) wrote :

Although this is not strictly data-loss, it is very confusing, and not obvious how to recover. I already talked to Michael on IRC, and he agreed that we should not automatically uninstall any postgresql-* packages after upgrade, since PostgreSQL has its own mechanism for upgrades and debconf notes about deprecated versions.

Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → High
milestone: none → ubuntu-8.04
status: New → Triaged
Changed in postgresql-8.3:
status: Incomplete → Invalid
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I changed update-manager to not cleanup postgresql even if its obsolete and moved to universe.

Changed in update-manager:
status: Triaged → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

This is in hardy now

Changed in update-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.