Page MenuHomePhabricator

postgresql problems and patches
Closed, ResolvedPublic

Description

Author: t-smw

Description:
Misc patches to solve postgres-specific issues during installation

I've installed mediawiki and smw from the tip of the master branch in git. While installing smw I've encountered multiple problems which I assume is related to the postgres support - I managed to get through the installation process by hacking a bit on the php code. My patches are attached.

Here is the revision info:

Mediawiki core:

commit 3a26db55ab4ba908b76cd9982794d1eeafb4afa0
Merge: 7c9a490 0d086f3
Date: Fri Apr 12 15:02:41 2013 +0000

smw:

commit a33907d0aafe817c628e1715b424d3749299f55e
Merge: 473ebba 197154e
Date: Wed Apr 10 21:29:18 2013 +0000

Problems solved by the patch:

  1. Index creation:

"CREATE $type $tableName ON $tableName"

Obviously this doesn't work very well, particularly when there are more than one index on a table. I've changed to:

"CREATE $type $indexName ON $tableName"

... but even that didn't work too well because indexName contained some badly placed double quotes. I changed the index name from "{$tableName}_index{$key}" to "{$rawTableName}_index{$key}" and that solved the issue.

  1. There were multiple references to a non-existent sequence smw_ids_smw_id_seq. I did a search'n'replace to smw_object_ids_smw_id_seq and I hope that's correct.
  1. Some error message about some variable not beeing a positive non-zero integer. Solved by casting the variable from a string to an int.

I have no experience with neither PHP nor smw, and not much experience with mediawiki neither, so obviously this patch needs some serious code review ;-)


Version: master
Severity: normal
OS: Linux
Platform: PC

Attached:

Details

Reference
bz47180

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:33 AM
bzimport set Reference to bz47180.
bzimport added a subscriber: Unknown Object (MLST).

Hi! Thanks for your patch!

You are welcome to use Developer access

https://www.mediawiki.org/wiki/Developer_access

to submit this as a Git branch directly into Gerrit:

https://www.mediawiki.org/wiki/Git/Tutorial

Putting your branch in Git makes it easier to review it quickly.
Thanks again! We appreciate your contribution.

t-smw wrote:

I will consider that next time I do bugfixing.

I eventually gave up getting smw and semantic maps to work with postgres.

Hi Tobias,

I tried uploading your patch to gerrit, but unfortunately, it did not apply cleanly. It's also possible to submit patches using the web-based uploader at https://tools.wmflabs.org/gerrit-patch-uploader . Please use 'Bug: 42241' in the commit message to link it to this bug.

Unknown Object (User) added a comment.Aug 6 2014, 3:11 PM

The suggestions made in the patch have been applied to SMW 1.9/SMW 2.0.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.