This the PostgreSQL equivalent to bug 71040 for Oracle.
Version: 1.25-git
Severity: normal
This the PostgreSQL equivalent to bug 71040 for Oracle.
Version: 1.25-git
Severity: normal
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Invalid | None | T2384 [REPLACED BY TAG] PostgreSQL/pgsql support (tracking) | ||
Resolved | Addshore | T75174 Make PHPUnit tests pass with PHP 5.5/PostgreSQL on Travis CI | ||
Resolved | Jjanes | T74834 PostgreSQL install fails on INSERT IGNORE INTO "mediawiki"."updatelog" in update_keys.sql | ||
· · · |
Change 170395 had a related patch set uploaded by Jjanes:
PostgreSQL: Port update-keys.sql to PostgreSQL
What error message are you getting with PostgreSQL (Oracle needs "FROM DUAL" after "SELECT"...)
Ok, I managed to reproduce it finally:
Query: INSERT IGNORE INTO "mediawiki"."updatelog"
SELECT 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql' AS ul_key, null as ul_value
UNION SELECT 'image-img_major_mime-patch-img_major_mime-chemical.sql', null
UNION SELECT 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null
UNION SELECT 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null
UNION SELECT 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null
UNION SELECT 'user_properties-up_property-patch-up_property.sql', null
Function: DatabaseBase::sourceFile( /usr/home/saper/public_html/pg/w/maintenance/update-keys.sql )
Error: 42601 ERROR: syntax error at or near "IGNORE"
LINE 1: ...l/pg/w/maintenance/update-keys.sql ) 127.0.0.1 */ IGNORE INT...
The IGNORE in "INSERT IGNORE" from the default version of the file (for MySQL and sqlite) is not valid syntax in PostgreSQL.
ERROR: syntax error at or near "IGNORE" at character 115
STATEMENT: INSERT /* DatabaseBase::sourceFile( /usr/local/apache2/htdocs/wiki_git/maintenance/update-keys.sql ) 127.0.0.1 */ IGNORE INTO "public"."updatelog"
...
The fix for the bug against Oracle claims the IGNORE is not needed because this file is only run against fresh installs so there cannot be primary key violations.
This bug was caused by change d315c3bdb34bce9327a494e9edf5fe3774b81d7b which added INSERT IGNORE.
So there are two issues:
We have already "LoggedUpdateMaintenance" to deal with those....
Do we want to wait for the issues from Gerrit change #135756 to get fixed for all databases? I'd rather have Jeff's patch merged now as this bug is a blocker for PostgreSQL and leave the clean-up for later as that is a (minor) pain point for all databases.
[Affects only one database engine, not the most common one. If not an immediate blocker, it's still a high priority task to fix this issue. ]
Change 176291 had a related patch set uploaded (by Legoktm):
PostgreSQL: Port update-keys.sql to PostgreSQL
@saper, is there documentation or examples on how LoggedUpdateMaintenance is supposed to work? It has me completely baffled.