r108769 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108768‎ | r108769 | r108770 >
Date:22:11, 12 January 2012
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/installer/PostgresUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/postgres/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/tables.sql
@@ -519,9 +519,11 @@
520520 job_cmd TEXT NOT NULL,
521521 job_namespace SMALLINT NOT NULL,
522522 job_title TEXT NOT NULL,
 523+ job_timestamp TIMESTAMPTZ,
523524 job_params TEXT NOT NULL
524525 );
525526 CREATE INDEX job_cmd_namespace_title ON job (job_cmd, job_namespace, job_title);
 527+CREATE INDEX job_timestamp_idx ON job (job_timestamp);
526528
527529 -- Tsearch2 2 stuff. Will fail if we don't have proper access to the tsearch2 tables
528530 -- Version 8.3 or higher only. Previous versions would need another parmeter for to_tsvector.
Index: trunk/phase3/includes/installer/PostgresUpdater.php
@@ -117,6 +117,7 @@
118118 array( 'addPgField', 'revision', 'rev_sha1', "TEXT NOT NULL DEFAULT ''" ),
119119 array( 'addPgField', 'archive', 'ar_sha1', "TEXT NOT NULL DEFAULT ''" ),
120120 array( 'addPgField', 'uploadstash', 'us_chunk_inx', "INTEGER NULL" ),
 121+ array( 'addPgField', 'job', 'job_timestamp', "TIMESTAMPTZ" ),
121122
122123 # type changes
123124 array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ),
@@ -184,6 +185,7 @@
185186 array( 'addPgIndex', 'logging', 'logging_user_type_time', '(log_user, log_type, log_timestamp)' ),
186187 array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
187188 array( 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ),
 189+ array( 'addPgIndex', 'job', 'job_timestamp_idx', '(job_timestamp)' ),
188190
189191 array( 'checkOiNameConstraint' ),
190192 array( 'checkPageDeletedTrigger' ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107866Follow up to r107830 - adding commit after update.amire8008:46, 3 January 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   04:48, 13 January 2012

What's the point of '_idx'?

Status & tagging log