Upgrade to 1.10+ fails on Postgres <9.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Unassigned | ||
1.10 |
Fix Released
|
Low
|
Unassigned | ||
15.04 |
Fix Released
|
Low
|
Unassigned | ||
15.10 |
Fix Released
|
Low
|
Unassigned |
Bug Description
Upgrading from 1.5.1 to versions higher than 1.9 (either directly or incrementally by version) fails on Postgres 8.4.
(And I'm assuming any version of Postgres prior to 9.1.)
Existing installation of Mahara 1.5.1.
Run through normal upgrade steps.
Expected result: Successful upgrade.
Actual result: upgrade screen reports this error in core upgrade section:
Could not execute command: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200)
Call stack (most recent first):
* execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at /srv/www/
* xmldb_core_
* upgrade_
Errors from Apache logs:
[DBG] 25 (lib/db/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) postgres7 error: [-1: ERROR: function concat(unknown, bigint) does not exist, referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) LINE 1: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SE..., referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) ^, referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) HINT: No function matches the given name and argument types. You might need to add explicit type casts.] in adodb_throw(UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200), ), referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) Command was: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200), referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [WAR] 25 (lib/errors.
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] Call stack (most recent first):, referer: https:/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * log_message("Could not execute command: UPDATE "artefact" SET p...", 8, true, true) at /srv/www/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * log_warn("Could not execute command: UPDATE "artefact" SET p...") at /srv/www/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * SQLException-
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at /srv/www/
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * xmldb_core_
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * upgrade_
(Why does it say "postgres7 error" above?)
It looks like it's asking Postgres to use the CONCAT function which, as far as I'm aware, did not exist in Postgres until 9.1.
http://
http://
Mahara explicitly states that it's supported on "PostgreSQL, all versions from 8.3" ( https:/
summary: |
- Upgrade to 1.10+ fails on Postgres8 + Upgrade to 1.10+ fails on Postgres <9.1 |
no longer affects: | mahara/16.04 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Hi Marcus,
Thanks for the bug report! We do indeed aim to support Postgres 8.3 & up, although due to limits on our resources we no longer actively test against the older versions. But we try to maintain compatibility with those versions, and will fix bugs when found. I'll see if I can put together a patch for this.
The "postgres7" is a message coming from our database abstraction library, ADODB. Prior to upgrading to ADODB 5.19 in Mahara 15.04 (see Bug 1384473) Mahara used the "postgres7" adodb driver. If you're upgrading to 15.04 and still seeing it, well, the "postgres8" driver we use now subclasses the postgres7 driver, so it's possible it still prints some of its error messages.
Cheers,
Aaron