News for hackers. Stuff that matters.
Re:Ask HN: How do big web sites roll out new versions? by Timothee on Saturday December 27, 2008 @04:10PM (#411365)
And when all the servers run the new code, are the databases changed to remove old columns or is it an absolute no-no with ever-expanding tables?
Re:Ask HN: How do big web sites roll out new versions? by seldo on Saturday December 27, 2008 @04:36PM (#411390)
At Yahoo we drop columns from the previous version the next time we upgrade the database, e.g. if you stopped using a 1.0 column in version 1.1, then you drop that column as part of the upgrade going to 1.2. The key thing is always being able to roll back if things go seriously wrong; hardware is much, much cheaper than downtime.
Re:Ask HN: How do big web sites roll out new versions? by bjclark on Saturday December 27, 2008 @04:23PM (#411377)
It's different for every site, db backend, etc.

If it's just 1 column, and it doesn't store much data, then probably no. If it's a bunch of columns and it's taking up lots of disk, they they probably migrate what they need to a new table and drop the old one. Altering tables is usually not a good idea. In mysql it can stop replication and can mean hours or days of downtime depending on the situation and amount of data.

Re:Ask HN: How do big web sites roll out new versions? by russell on Saturday December 27, 2008 @04:27PM (#411384)
Unless you really need the space, I suggest leaving the columns there. Fewer chances for error. If your columns are nullable, the amount of space taken up by an obsolete column tends to one byte, particularly if old data is deleted.
Re:Ask HN: How do big web sites roll out new versions? by brianm on Saturday December 27, 2008 @04:18PM (#411374)
Once you are sure you are never going to roll back to the old code you can wipe out the old columns.
Re:Ask HN: How do big web sites roll out new versions? by gaius on Saturday December 27, 2008 @04:35PM (#411389)
In practical terms you generally don't tho'. You might need them again, for example, for some as-yet-unplanned new feature. And doing so is of limited value anyway in many databases, you won't get the space back without a re-org and that's a costly operation to do hot, if you even can at all.