Hi,
Why not alter mw code to allow for dynamic table renames of any table (at present only user is covered). Then you can create a new table with the correct structure and move the records from one to another, before discontinuing the old table? Alter table is a nasty process on such a big db.
This could have other benefits, as you could potentially share tables between wikis easier (though there is no way to identify which wiki... maybe theres a hook I could use for that). Basically I run a bunch of wikis and have unified certain aspects of the DB through hooks - writing categories, pages and search to a central store at present, keyed by original db id and wiki id. This allows me to search across wiki boundaries, but maintain wikis atomically (useful for security).
I am trying not to replace bits of the mw code base (merely supplement) as much as possible, so maintenance doesn't become a nightmare when you guys decide to rework the whole schema! Recentchanges is a new target and I am umming and ahhing over extending it in a similar fashion. I'll probably do the patch for that, but it occurs to me the strategy of an extra column for wiki identifier must have merit for the Wikimedia foundations, as it allows for a degree of centralization across projects.
Anyway, keep up the good work.
TTFN,
Alex
On Thu, Feb 21, 2008 at 4:31 PM, Simetrical Simetrical+wikilist@gmail.com wrote:
On Thu, Feb 21, 2008 at 11:25 AM, Roan Kattouw roan.kattouw@home.nl wrote:
That's why I said we probably do want a cl_is_category boolean field. Of course filling it would be a huge operation on enwp.
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. :)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l