Simetrical wrote:
Well, not really. It wouldn't lock anything, so
you could just run it
and forget about it. The huge operation would be adding the column in
the first place, since ALTER TABLE locks the table to writes. That
has to be done by taking slaves out of rotation one by one, and is a
pain, plus the alter itself takes a long time. That's a mark against
that option; the other two require no such alterations.
Of course, I've always wondered why we couldn't have a more painless
way to do stuff like this, like some nice "run and keep half an eye on
it" shell script. I don't see why it has to be a huge deal just
because it takes a few hours, or even a few days. But I'm not a root
and don't have much opportunity to try my hand at automation. :)
It's strange it hasn't been done yet.