When a page is updated under PostgreSQL, there is code to
de-index all but the most recent version of the page. But
when a page is moved, it was accidentally de-indexing the
most recent version as well, because rev_text_id is not
incremented in that case. A simple tweak to the SQL
fixes that.
I added code to the update script to find pages
previously corrupted by this problem and reindex them.
Bug: 66650
Change-Id: I52e1bbbd8592be5e7c7383c225e6b4c19bbe5b9e
This fixes the same bug in PostgreSQL that was reported
against Oracle as bug 71040, using the same method of copying
the update-keys.sql script into maintenance/postgres.
Since all three copies of this file do the same thing, perhaps
we should find lowest-common-denominator syntax that works in
all databases to avoid redundant copies that can get out of
sync with each other. (The Oracle and PostgreSQL versions are
already identical to each other).
The comments in the file are confusing and ungrammatical, but
they are a copy of the same language from the other copies.
Since I don't know what it is trying to say, I can't
fix it.
I have verified that this patch fixes the problem where
mediawiki could not be installed with PostgreSQL using
either the CLI or the web installer, due to SQL syntax errors.
I haven't tested the the update-keys actually accomplishes
whatever it was introduced to accomplish, though.
Bug: 72834
Change-Id: I2a0cfa3dd0751b9fb65450b1537b6e77be60009a