Christopher Allan Webber

Database upgrades

Christopher Allan Webber at

I've done a couple upgrades to postgres over the last year that have required me rebuilding the database. This has made me realize that even if MediaGoblin gets schema upgrades to the point where users don't have to notice on MediaGoblin's end, it isn't enough to "simplify" things for users totally.

Which isn't to say we shouldn't try, but that my feelings that we need better tooling for deployments feel more justified. :)

Christopher Allan Webber at 2014-11-17T19:01:48Z

X11R5 likes this.

Deploying to postgres isn't stricly simple, yeah. But could you explain some of your problems with postgres? Because I always felt postgres being very well suited for any medium to large scenario. And the upgrading being well structured.

In fact, my company uses postgres for nearly everything and we have debian/postinst scripts that automatically setup/update the complete database structure for our software.

Elrond at 2014-11-17T19:16:52Z

Deploying to postgres here isn't the problem in this case, upgrading is, and the problem presented isn't a huge one, but it's the type of thing that makes keeping deployments running hard.

This year on one debian stable server, I did an upgrade from apt and found it needed me to manually convert my databases from one version to the other. This happened during that "important info" text stage that is tempting to just skip over while doing an apt-get upgrade, but it gave me some really nice steps that were easy to follow. I could still run the old version of the database, no problem. But it took me a couple months to actually upgrade to the new version because I was afraid I would do the wrong thing in the manual upgrade.

Similarly I saw such a prompt to upgrade my local laptop postgres a couple weeks ago on Debian Testing, this one a different upgrade. I think it suggested I dump my db then reimport it.

These are not terribly hard things to do if you know how to navigate the command line, but just as I don't like that users have to know how to run "./bin/gmg dbupdate", I wish users did not know how to upgrade the postgres they depend on either.

It's not a criticism, it's a thought on one thing that makes deployment hard.

Christopher Allan Webber at 2014-11-17T19:34:31Z

>> Christopher Allan Webber:

“It's not a criticism, it's a thought on one thing that makes deployment hard.”


Why isn't that a criticism? Databases are required, and all other things being very, very easy, the upgrade path you've described would single-handedly stop existing MediaGoblin sites from staying online if hosted by anyone that doesn't work in webcraft.


This is an issue that doesn't come up (often? at all?) for PHP/MySQL apps made to be hosted on shared services. So yeah, it is a valid criticism. ^_^

maiki at 2014-11-18T00:08:25Z

lnxwalt@microca.st likes this.