You are not logged in.

#1 2009-09-28 18:38:35

phaul
Member
From: United Kingdom
Registered: 2009-09-28
Posts: 5
Website

postgres update is not backwards compatible

Hi all,

the 8.4 postgresql server updated recently isn't backwards compatible, it refuses to read the old database files. Basically I have wasted 2 hours of my life because arch happily upgraded postgres without saying anything.  If I knew this beforehand I could just dump the database and restore the dump into 8.4. The problematic vim or php upgrades were at least announced on the arch news feed..

Anyway my personal opinion is that a news feed isn't good enough.

I'm wondering if we could have a functionality in pacman giving information about updates that would break a live server without user interaction, and asking for confirmation to proceed.

Offline

#2 2009-09-28 19:02:30

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: postgres update is not backwards compatible

I don't really see what the the big deal is.  I too upgraded to 8.4 before dumping my db, but then I simply downgraded back to 8.3 and everything was fine.

It's not the fault of pacman that you didn't pay attention to the available upgrades.  The postgresql wiki even dedicates an entire section to the do's and dont's of upgrading postgresql.  Don't blame the application for user error.

Last edited by thayer (2009-09-28 19:02:45)


thayer williams ~ thayerwilliams.ca

Offline

#3 2009-09-28 19:16:48

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: postgres update is not backwards compatible

You shall always stop the database server before upgrade.  Not only the wiki stipulates so as thayer says, so does the postgresql manual.  If you blindly run a system upgrade, put postgresql in the ignorepackage in pacman conf.

Offline

#4 2009-09-28 19:38:09

phaul
Member
From: United Kingdom
Registered: 2009-09-28
Posts: 5
Website

Re: postgres update is not backwards compatible

I agree with the concept that the user should know what he is doing, and the program can't be blamed for user errors. I don't agree with the expectation that the user should check the program website to make sure that the upgrade is safe.

Offline

#5 2009-09-28 21:23:41

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: postgres update is not backwards compatible

phaul wrote:

I agree with the concept that the user should know what he is doing, and the program can't be blamed for user errors. I don't agree with the expectation that the user should check the program website to make sure that the upgrade is safe.

Then unfortunately you should get accustomed to disappointment, as that methodology applies to every piece of software.  I know it can be frustrating and I've made the same mistake many times, but it's a step that really can't be avoided; particularly for mission-critical software.

Last edited by thayer (2009-09-28 21:24:06)


thayer williams ~ thayerwilliams.ca

Offline

#6 2009-09-28 21:36:48

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: postgres update is not backwards compatible

With rolling release, you should consider every upgrade as problematic as an upgrade between releases of a periodic release distro.  Most are not that bad, some are...

Offline

#7 2009-09-28 22:31:52

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: postgres update is not backwards compatible

phaul wrote:

the 8.4 postgresql server updated recently isn't backwards compatible, it refuses to read the old database files.

None of the PostgreSQL major upgrades (ie, 8.2 -> 8.3 -> 8.4) can read the databases from other versions. They always require a full dump and restore of your databases. This is stated in the PostgreSQL documentation under "Upgrading":
http://www.postgresql.org/docs/8.4/inte … ading.html

phaul wrote:

Basically I have wasted 2 hours of my life because arch happily upgraded postgres without saying anything.

Pacman is a package manager, not a system administrator.

phaul wrote:

If I knew this beforehand I could just dump the database and restore the dump into 8.4.

If you're going to run software that is seemingly so important to your operations, then you should familiarize yourself with the software in question, not just rely on pacman (a package manager) to take care of it for you. At the very least, add 'postgresql' to the 'IgnorePkg' list in pacman.conf so it won't be upgraded until you force an upgrade.

phaul wrote:

I'm wondering if we could have a functionality in pacman giving information about updates that would break a live server without user interaction, and asking for confirmation to proceed.

Pacman is a package manager, not a system administrator.

Offline

#8 2009-09-29 06:57:12

RagingDragon
Member
Registered: 2008-07-27
Posts: 24

Re: postgres update is not backwards compatible

Allan wrote:

With rolling release, you should consider every upgrade as problematic as an upgrade between releases of a periodic release distro.

If that were the case rolling release distros would be unusable - you'd have so spend a week doing testing, prepartion and prepartion and fixes every day... wink

Allan wrote:

Most are not that bad, some are...

I've yet to see one *that* bad. I've seen some breakage with Arch updates, but nothing too serious.

Offline

#9 2009-09-29 09:16:18

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: postgres update is not backwards compatible

phaul wrote:

I'm wondering if we could have a functionality in pacman ...

Wondering won't get you anywhere. Post a feature request in the bugtracker, and the devs will read and consider it.

Offline

Board footer

Powered by FluxBB