From 351332641a443518bb19638e32ab380e15a1ccb6 Mon Sep 17 00:00:00 2001 From: OverlordQ Date: Thu, 12 Jan 2012 22:11:12 +0000 Subject: [PATCH] Followup to r107866, add in new job_timestamp field which was likely completely breaking anything related to the job queue, should fix failing TemplateCategoriesTest.testTemplateCategories on PG --- includes/installer/PostgresUpdater.php | 2 ++ maintenance/postgres/tables.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index af60b147f7..41e5b31378 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -117,6 +117,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'addPgField', 'revision', 'rev_sha1', "TEXT NOT NULL DEFAULT ''" ), array( 'addPgField', 'archive', 'ar_sha1', "TEXT NOT NULL DEFAULT ''" ), array( 'addPgField', 'uploadstash', 'us_chunk_inx', "INTEGER NULL" ), + array( 'addPgField', 'job', 'job_timestamp', "TIMESTAMPTZ" ), # type changes array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ), @@ -184,6 +185,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'addPgIndex', 'logging', 'logging_user_type_time', '(log_user, log_type, log_timestamp)' ), array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ), array( 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ), + array( 'addPgIndex', 'job', 'job_timestamp_idx', '(job_timestamp)' ), array( 'checkOiNameConstraint' ), array( 'checkPageDeletedTrigger' ), diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index c85701850d..6890df918f 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -519,9 +519,11 @@ CREATE TABLE job ( job_cmd TEXT NOT NULL, job_namespace SMALLINT NOT NULL, job_title TEXT NOT NULL, + job_timestamp TIMESTAMPTZ, job_params TEXT NOT NULL ); CREATE INDEX job_cmd_namespace_title ON job (job_cmd, job_namespace, job_title); +CREATE INDEX job_timestamp_idx ON job (job_timestamp); -- Tsearch2 2 stuff. Will fail if we don't have proper access to the tsearch2 tables -- Version 8.3 or higher only. Previous versions would need another parmeter for to_tsvector. -- 2.20.1