PostgreSQL: Fix text search on moved pages
authorJeff <jeff.janes@gmail.com>
Tue, 12 Aug 2014 06:35:35 +0000 (23:35 -0700)
committerJeff Janes <jeff.janes@gmail.com>
Wed, 18 Feb 2015 02:15:23 +0000 (18:15 -0800)
commitc1371e7f54e0f42d9c367a58121adee0259799fd
tree04e64c5ec744d05d38b1416dea381ad4512677e2
parentcab99af90e4b5c9cc1d5f3ce769245876ac643a0
PostgreSQL: Fix text search on moved pages

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
includes/installer/PostgresUpdater.php
includes/search/SearchPostgres.php
maintenance/postgres/archives/patch-textsearch_bug66650.sql [new file with mode: 0644]
maintenance/postgres/update-keys.sql