←back to thread

264 points davidgomes | 3 comments | | HN request time: 0.6s | source
1. webprofusion ◴[] No.41876591[source]
Lol, try upgrading old MongoDB stuff.

Database engines (every single one) are notorious for incompatibilities between major versions, upgrading mission critical stuff means updating and re-testing entire applications, which in some cases can be a multi-million dollar process, before going into production.

Even if you deeply know/think that there's no problem upgrading, if something does fail in production after an upgrade and it's mission critical..

replies(1): >>41877740 #
2. x-_-x ◴[] No.41877740[source]
This. I was tasked with upgrading Postgresql from a very old version (I think 9?) to one that was still supported a couple of years ago. Backwards compatibility is paramount and from my experience upgrading MySQL/MariaDB I know that changes in versions can break it.

For this reason, I chose to upgrade to version 11 because it was only a couple of versions apart and still had repositories available at the time.

So the first thing I do is stop the VM and take a snapshot. Then I start it back up and go check for database corruption before I dump them... wait there's no utility to check for corruption...? Yep that's right! You basically have to YOLO the whole thing and hope it works. OK...

So I dump the databases and back up the directory. I shut down the old version and then install the new version from the repo. I start to import the databases and notice in the scrolling logs that there's some incompatibility... Oh F*$&. I google the error and spend a good hour trying to figure it out. Apparently there are external plugins for postgres that were installed in the old version. I search for the plugins online and they are long discontinued. OK, so let's just copy them over from the old version. I stop postgres, copy them over, and start it back up. It starts up ok. I reimport the databases and no more errors. Yay! I start the applicationsand pray to the SQL gods. So far so good, everything seems to work.

Thankfully the applications tested well and worked post upgrade.

All of this was done for a critical multi-million dollar healthcare platform. There were no official guides. Nothing. I had to find some random admin's blog for guidance. MySQL on the other hand has full documentation on just about every aspect of everything. The whole process was super hackish and not having any way to check database integrity would have been a show stopper for me had I designed this configuration.

replies(1): >>41880601 #
3. teddyh ◴[] No.41880601[source]
> there are external plugins for postgres that were installed in the old version. I search for the plugins online and they are long discontinued.

You can hardly blame PostgreSQL for that.