Question to the database experts:
- How can the database of MediaWiki 1.5.x safely be pruned ( in order to actually remove the oldest revisions of Article, Talk, User and User_talk pages ) ?
An older answer given to me begin of 2005 was
DELETE FROM old WHERE old_timestamp < '20050101000000'; or whatever
Is it safe to use this statement or is another one recommended ?
Thomas Gries wrote:
Question to the database experts:
- How can the database of MediaWiki 1.5.x safely be pruned
( in order to actually remove the oldest revisions of Article, Talk, User and User_talk pages ) ?
MediaWiki is designed to retain *all* versions permanently, so I wouldn't recommend ever doing this.
If you want to anyway, then you'll need to be somewhat careful about how you go about it; it'll be harder to do it 'safely' with the 1.5 schema.
An older answer given to me begin of 2005 was
DELETE FROM old WHERE old_timestamp < '20050101000000'; or whatever
Is it safe to use this statement or is another one recommended ?
Well that definitely won't work as there is no more 'old' table. :)
To destroy a stored revision you'll need to remove its entries from both: * 'revision' table: one row for each revision, including the current version * 'text' table: each row may be used by *one or more* revisions
If you are using multiple-row compression options, it will be difficult to determine if a given text table entry is really unused. If you're not using this, then you can just check on the join from revision.rev_text_id to text.old_id.
You could probably do a SELECT on revision and page to get non-current revisions older than a certain date. Dump their rev_text_ids into a temporary table. Delete the matching revisions from revision, then remove from the temporary table any rev_text_ids that still exist in revision. Now, delete the rows from text which match the remaining listed text rows. Might work.
-- brion vibber (brion @ pobox.com)
Thomas Gries <mail@...> writes:
Question to the database experts:
- How can the database of MediaWiki 1.5.x safely be pruned
( in order to actually remove the oldest revisions of Article, Talk, User and User_talk pages ) ?
An older answer given to me begin of 2005 was
DELETE FROM old WHERE old_timestamp < '20050101000000'; or whatever
Is it safe to use this statement or is another one recommended ?
If you find a good way of doing this (possibly Brion's suggestion), can you add a page on meta with simple instructions? I'm sure other people (me especially) would like a safe way of doing this.
Ryan Lane
To Brion: thanks for your explanation [not copied here]
To all: I overlooked this nice and recent http://bugzilla.wikimedia.org/show_bug.cgi?id=3612 Function to compress or delete old content in database
which appears to be a solution or at least the best starting point to find a solution to my question
to the database experts:
- How can the database of MediaWiki 1.5.x safely be pruned
( in order to actually remove the oldest revisions of Article, Talk, User and User_talk pages ) ?
wikitech-l@lists.wikimedia.org